User Tools

Site Tools


openapi

**This is an old revision of the document!**

OpenAPI document structures

Sources

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 : Map[string, Response Object | Reference Object]
  • parameters : Map[string, Parameter Object | Reference Object]
  • examples : Map[string, Example Object | Reference Object]
  • requestBodies : Map[string, Request Body Object | Reference Object]
  • headers : Map[string, Header Object | Reference Object]
  • securitySchemes : Map[string, Security Scheme Object | Reference Object]
  • links : Map[string, Link Object | Reference Object]
  • callbacks : Map[string, Callback Object | Reference Object]

3.0.3

https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md

  • openapi : string
  • info : Info
    • title : string
    • description : string
    • termsOfService : string
    • contact : Contact
    • license : License
    • version : string
  • servers : [Server]
    • url : string
    • description : string
    • variables : Map[string, Server Variable]
  • paths : Paths
    • $ref : string
    • summary : string
    • description : string
    • get : Operation
    • put : Operation
    • post : Operation
    • delete : Operation
    • options : Operation
    • head : Operation
    • patch : Operation
    • trace : Operation
    • servers : [Server]
    • parameters : [Parameter | Reference]
  • components : Components
    • schemas : Map[string, Schema|Reference]
    • responses : Map[string, Response|Reference]
    • parameters : Map[string, Parameter|Reference]
    • examples : Map[string, Example|Reference]
    • requestBodies : Map[string, RequestBody|Reference]
    • headers : Map[string, Header|Reference]
    • securitySchemes : Map[string, SecurityScheme|Reference]
    • links : Map[string, Link|Reference]
    • callbacks : Map[string, Callback|Reference]
  • security : [Security Requirement]
    • <name> : [string]
  • tags : [Tag]
    • name : string
    • description : string
    • externalDocs : ExternalDocumentation
  • externalDocs: ExternalDocumentation
    • description : string
    • url : string

3.0.4

  • same as 3.0.3! (at least the top-level structure is)

3.1.0

  • openapi : string
  • info : Info Object
  • jsonSchemaDialect : string
  • servers : [Server Object]
  • paths : Paths Object
  • webhooks : Map[string, Path Item Object | Reference Object] ]
  • components : Components Object
  • security : [Security Requirement Object]
  • tags : [Tag Object]
  • externalDocs : External Documentation Object

3.1.1

  • same as 3.1.0 (at least the top-level structure is the same)
openapi.1738352371.txt.gz ยท Last modified: 2025/01/31 19:39 by ron

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki