Skip to content

Instantly share code, notes, and snippets.

@johnkoerner
Created September 27, 2018 18:17
Show Gist options
  • Save johnkoerner/952becd82bbb238b51907791d0a13d32 to your computer and use it in GitHub Desktop.
Save johnkoerner/952becd82bbb238b51907791d0a13d32 to your computer and use it in GitHub Desktop.
A sample to show bearer token generation in openapi-generator
openapi: 3.0.0
servers:
- url: 'http://example.com'
info:
description: This is an example
version: 0.0.1
title: Example
termsOfService: ''
paths:
/foobar:
post:
operationId: createFoobar
description: Create a foobar
requestBody:
description: Product definition
required: true
content:
application/json:
schema:
type: object
properties:
name: # <!--- form field name
type: string
responses:
'201':
$ref: '#/components/responses/Created'
components:
securitySchemes:
bearerAuth: # arbitrary name for the security scheme
type: http
scheme: bearer
bearerFormat: JWT
security:
- bearerAuth: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment