openapi
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| openapi [2025/02/21 15:26] – added skeliton of 3.0.2 schema ron | openapi [2025/04/13 16:23] (current) – removed ron | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== OpenAPI document structures ====== | ||
| - | ===== Sources ===== | ||
| - | * https:// | ||
| - | * https:// | ||
| - | |||
| - | ===== Structure by Version ===== | ||
| - | surprising how much the structure can change between versions; here's a handful of versions to show that. note the structure is the same for JSON and YAML versions. | ||
| - | |||
| - | ==== 3.0.1 ==== | ||
| - | * schemas : Map[string, Schema Object | Reference Object] | ||
| - | * responses : | ||
| - | * parameters : | ||
| - | * examples : Map[string, Example Object | Reference Object] | ||
| - | * requestBodies : | ||
| - | * headers : Map[string, Header Object | Reference Object] | ||
| - | * securitySchemes : | ||
| - | * links : Map[string, Link Object | Reference Object] | ||
| - | * callbacks : | ||
| - | |||
| - | ==== 3.0.2 ==== | ||
| - | https:// | ||
| - | * openapi | ||
| - | * info : Info | ||
| - | * servers | ||
| - | * paths : Map[string, PathItem] | ||
| - | * "/ | ||
| - | * $ref : string | ||
| - | * summary | ||
| - | * description : string | ||
| - | * get : Operation | ||
| - | * tags : string[] | ||
| - | * summary | ||
| - | * description | ||
| - | * externalDocs : ExternalDocs | ||
| - | * operationId | ||
| - | * parameters | ||
| - | * name : string | ||
| - | * in : string (" | ||
| - | * description | ||
| - | * required | ||
| - | * deprecated | ||
| - | * allowEmptyValue : boolean | ||
| - | * style : string | ||
| - | * explode | ||
| - | * allowReserved | ||
| - | * schema | ||
| - | * type : string | ||
| - | * format | ||
| - | * description | ||
| - | * title : string | ||
| - | * multipleOf | ||
| - | * maximum | ||
| - | * exclusiveMaximum | ||
| - | * minimum | ||
| - | * exclusiveMinimum | ||
| - | * maxLength | ||
| - | * minLength | ||
| - | * pattern | ||
| - | * maxItems | ||
| - | * minItems | ||
| - | * uniqueItems | ||
| - | * maxProperties | ||
| - | * minProperties | ||
| - | * required | ||
| - | * enum : | ||
| - | * allOf : Schema | Reference | ||
| - | * oneOf : Schema | Reference | ||
| - | * anyOf : Schema | Reference | ||
| - | * not : Schema | Reference | ||
| - | * items : Schema | Reference | ||
| - | * properties | ||
| - | * additionalProperties : boolean | Object | ||
| - | * default | ||
| - | * discriminator | ||
| - | * readOnly | ||
| - | * writeOnly | ||
| - | * xml : XML | ||
| - | * externalDocs | ||
| - | * example | ||
| - | * deprecated | ||
| - | * example | ||
| - | * examples | ||
| - | * requestBody | ||
| - | * responses | ||
| - | * callbacks | ||
| - | * deprecated | ||
| - | * security | ||
| - | * servers | ||
| - | * put : Operation | ||
| - | * post : Operation | ||
| - | * delete | ||
| - | * options | ||
| - | * head : Operation | ||
| - | * patch : Operation | ||
| - | * trace : Operation | ||
| - | * servers | ||
| - | * parameters | ||
| - | * components | ||
| - | * security | ||
| - | * tags : [Tag] | ||
| - | * externalDocs : ExternalDocs | ||
| - | |||
| - | |||
| - | ==== 3.0.3 ==== | ||
| - | https:// | ||
| - | * openapi : string (" | ||
| - | * info : Info | ||
| - | * title : string | ||
| - | * description : | ||
| - | * termsOfService : | ||
| - | * contact : Contact | ||
| - | * license : License | ||
| - | * version : string | ||
| - | * servers : [Server] | ||
| - | * url : string | ||
| - | * description : | ||
| - | * variables : | ||
| - | * paths : Paths | ||
| - | * $ref : string | ||
| - | * summary : string | ||
| - | * description : | ||
| - | * get : Operation | ||
| - | * put : Operation | ||
| - | * post : Operation | ||
| - | * delete : Operation | ||
| - | * options : Operation | ||
| - | * head : Operation | ||
| - | * patch : Operation | ||
| - | * trace : Operation | ||
| - | * servers : [Server] | ||
| - | * parameters : | ||
| - | * components : | ||
| - | * schemas : Map[string, Schema|Reference] | ||
| - | * responses : | ||
| - | * parameters : | ||
| - | * examples : Map[string, Example|Reference] | ||
| - | * requestBodies : | ||
| - | * headers : Map[string, Header|Reference] | ||
| - | * securitySchemes : | ||
| - | * links : Map[string, Link|Reference] | ||
| - | * callbacks : | ||
| - | * security : [Security Requirement] | ||
| - | * < | ||
| - | * tags : [Tag] | ||
| - | * name : string | ||
| - | * description : | ||
| - | * externalDocs : | ||
| - | * externalDocs: | ||
| - | * description : | ||
| - | * url : string | ||
| - | |||
| - | ==== 3.0.4 ==== | ||
| - | * same as 3.0.3! | ||
| - | |||
| - | ==== 3.1.0 ==== | ||
| - | * openapi : string | ||
| - | * info : Info Object | ||
| - | * jsonSchemaDialect : | ||
| - | * servers : [Server Object] | ||
| - | * paths : Paths Object | ||
| - | * webhooks : Map[string, Path Item Object | Reference Object] ] | ||
| - | * components : | ||
| - | * security : [Security Requirement Object] | ||
| - | * tags : [Tag Object] | ||
| - | * externalDocs : | ||
| - | |||
| - | ==== 3.1.1 ==== | ||
| - | * same as 3.1.0 (at least the top-level structure is the same) | ||
| - | |||
| - | ====== Gotchas ====== | ||
| - | '' | ||
| - | e.g., instead of | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | } | ||
| - | use | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | } | ||
| - | |||
| - | otherwise the description will be lost because according to https:// | ||
| - | > Any sibling elements of a '' | ||
openapi.1740151600.txt.gz · Last modified: 2025/02/21 15:26 by ron
