Skip to content

Instantly share code, notes, and snippets.

@gonzalad
Created December 12, 2018 09:59
Show Gist options
  • Save gonzalad/1953b3c504240112bfc11241eb5afa38 to your computer and use it in GitHub Desktop.
Save gonzalad/1953b3c504240112bfc11241eb5afa38 to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
description: Api Documentation
version: '1.0'
title: Api Documentation
termsOfService: 'urn:tos'
contact: {}
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0'
tags:
- name: basic-error-controller
description: Basic Error Controller
- name: vehicle-controller
description: Vehicle Controller
paths:
/error:
get:
tags:
- basic-error-controller
summary: errorHtml
operationId: errorHtmlUsingGET
responses:
'200':
description: OK
content:
text/html:
schema:
$ref: '#/components/schemas/ModelAndView'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
deprecated: false
head:
tags:
- basic-error-controller
summary: errorHtml
operationId: errorHtmlUsingHEAD
responses:
'200':
description: OK
content:
text/html:
schema:
$ref: '#/components/schemas/ModelAndView'
'204':
description: No Content
'401':
description: Unauthorized
'403':
description: Forbidden
deprecated: false
post:
tags:
- basic-error-controller
summary: errorHtml
operationId: errorHtmlUsingPOST
responses:
'200':
description: OK
content:
text/html:
schema:
$ref: '#/components/schemas/ModelAndView'
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
deprecated: false
put:
tags:
- basic-error-controller
summary: errorHtml
operationId: errorHtmlUsingPUT
responses:
'200':
description: OK
content:
text/html:
schema:
$ref: '#/components/schemas/ModelAndView'
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
deprecated: false
delete:
tags:
- basic-error-controller
summary: errorHtml
operationId: errorHtmlUsingDELETE
responses:
'200':
description: OK
content:
text/html:
schema:
$ref: '#/components/schemas/ModelAndView'
'204':
description: No Content
'401':
description: Unauthorized
'403':
description: Forbidden
deprecated: false
options:
tags:
- basic-error-controller
summary: errorHtml
operationId: errorHtmlUsingOPTIONS
responses:
'200':
description: OK
content:
text/html:
schema:
$ref: '#/components/schemas/ModelAndView'
'204':
description: No Content
'401':
description: Unauthorized
'403':
description: Forbidden
deprecated: false
patch:
tags:
- basic-error-controller
summary: errorHtml
operationId: errorHtmlUsingPATCH
responses:
'200':
description: OK
content:
text/html:
schema:
$ref: '#/components/schemas/ModelAndView'
'204':
description: No Content
'401':
description: Unauthorized
'403':
description: Forbidden
deprecated: false
/vehicles:
get:
tags:
- vehicle-controller
summary: findAll
operationId: findAllUsingGET
responses:
'200':
description: OK
content:
'*/*':
schema:
type: array
items:
$ref: '#/components/schemas/Vehicle'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
deprecated: false
servers:
- url: '//localhost:8080/'
components:
schemas:
Car:
title: Car
allOf:
- $ref: '#/components/schemas/Vehicle'
- type: object
properties:
model:
type: string
name:
type: string
topSpeed:
type: number
format: double
type:
type: string
title: Car
ModelAndView:
type: object
properties:
empty:
type: boolean
model:
type: object
modelMap:
type: object
additionalProperties:
type: object
reference:
type: boolean
status:
type: string
enum:
- 100 CONTINUE
- 101 SWITCHING_PROTOCOLS
- 102 PROCESSING
- 103 CHECKPOINT
- 200 OK
- 201 CREATED
- 202 ACCEPTED
- 203 NON_AUTHORITATIVE_INFORMATION
- 204 NO_CONTENT
- 205 RESET_CONTENT
- 206 PARTIAL_CONTENT
- 207 MULTI_STATUS
- 208 ALREADY_REPORTED
- 226 IM_USED
- 300 MULTIPLE_CHOICES
- 301 MOVED_PERMANENTLY
- 302 FOUND
- 302 MOVED_TEMPORARILY
- 303 SEE_OTHER
- 304 NOT_MODIFIED
- 305 USE_PROXY
- 307 TEMPORARY_REDIRECT
- 308 PERMANENT_REDIRECT
- 400 BAD_REQUEST
- 401 UNAUTHORIZED
- 402 PAYMENT_REQUIRED
- 403 FORBIDDEN
- 404 NOT_FOUND
- 405 METHOD_NOT_ALLOWED
- 406 NOT_ACCEPTABLE
- 407 PROXY_AUTHENTICATION_REQUIRED
- 408 REQUEST_TIMEOUT
- 409 CONFLICT
- 410 GONE
- 411 LENGTH_REQUIRED
- 412 PRECONDITION_FAILED
- 413 PAYLOAD_TOO_LARGE
- 413 REQUEST_ENTITY_TOO_LARGE
- 414 URI_TOO_LONG
- 414 REQUEST_URI_TOO_LONG
- 415 UNSUPPORTED_MEDIA_TYPE
- 416 REQUESTED_RANGE_NOT_SATISFIABLE
- 417 EXPECTATION_FAILED
- 418 I_AM_A_TEAPOT
- 419 INSUFFICIENT_SPACE_ON_RESOURCE
- 420 METHOD_FAILURE
- 421 DESTINATION_LOCKED
- 422 UNPROCESSABLE_ENTITY
- 423 LOCKED
- 424 FAILED_DEPENDENCY
- 426 UPGRADE_REQUIRED
- 428 PRECONDITION_REQUIRED
- 429 TOO_MANY_REQUESTS
- 431 REQUEST_HEADER_FIELDS_TOO_LARGE
- 451 UNAVAILABLE_FOR_LEGAL_REASONS
- 500 INTERNAL_SERVER_ERROR
- 501 NOT_IMPLEMENTED
- 502 BAD_GATEWAY
- 503 SERVICE_UNAVAILABLE
- 504 GATEWAY_TIMEOUT
- 505 HTTP_VERSION_NOT_SUPPORTED
- 506 VARIANT_ALSO_NEGOTIATES
- 507 INSUFFICIENT_STORAGE
- 508 LOOP_DETECTED
- 509 BANDWIDTH_LIMIT_EXCEEDED
- 510 NOT_EXTENDED
- 511 NETWORK_AUTHENTICATION_REQUIRED
view:
$ref: '#/components/schemas/View'
viewName:
type: string
title: ModelAndView
Truck:
title: Truck
allOf:
- $ref: '#/components/schemas/Vehicle'
- type: object
properties:
model:
type: string
name:
type: string
payloadCapacity:
type: integer
format: int32
type:
type: string
title: Truck
Vehicle:
type: object
discriminator:
propertyName: type
mapping:
car: '#/components/schemas/Car'
truck: '#/components/schemas/Truck'
properties:
model:
type: string
name:
type: string
type:
type: string
title: Vehicle
View:
type: object
properties:
contentType:
type: string
title: View
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment