OpenAPI Specification: Difference between revisions
Jump to navigation
Jump to search
(→title) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
The document addresses both OpenAPI 2.0 and OpenAPI 3.0. The differences will be emphasized. | The document addresses both OpenAPI 2.0 and OpenAPI 3.0. The differences will be emphasized. | ||
=Swagger Java Model= | |||
[[File:SwaggerJavaModel.png]] | |||
=info= | =info= | ||
Line 12: | Line 16: | ||
When imported in AWS API Gateway, the title provides the API [[Amazon_API_Gateway_Concepts#API_Name|name]]. | When imported in AWS API Gateway, the title provides the API [[Amazon_API_Gateway_Concepts#API_Name|name]]. | ||
=Organizatorium= | |||
==x-nullable== | |||
Appears in automatically generated Swagger files, as such: | |||
definitions: | |||
LibraryAccount: | |||
type: object | |||
required: | |||
- name | |||
properties: | |||
name: | |||
type: string | |||
'''x-nullable''': '''true''' | |||
definitions: | |||
A: | |||
type: string | |||
title: A | |||
'''x-nullable''': '''true''' | |||
When used for an API Gateway import, it errors out as: | |||
Unable to create model for 'LibraryAccount': Invalid model specified: Validation Result: warnings : [], errors : [Invalid model schema specified. Unsupported keyword(s): ["x-nullable"]] |
Revision as of 17:02, 22 March 2019
Internal
Overview
The document addresses both OpenAPI 2.0 and OpenAPI 3.0. The differences will be emphasized.
Swagger Java Model
info
title
When imported in AWS API Gateway, the title provides the API name.
Organizatorium
x-nullable
Appears in automatically generated Swagger files, as such:
definitions: LibraryAccount: type: object required: - name properties: name: type: string x-nullable: true
definitions: A: type: string title: A x-nullable: true
When used for an API Gateway import, it errors out as:
Unable to create model for 'LibraryAccount': Invalid model specified: Validation Result: warnings : [], errors : [Invalid model schema specified. Unsupported keyword(s): ["x-nullable"]]