This document will define a deterministic ordering of fields at every level of an OpenAPI v2 document. ApiView should transform an input document to conform to this ordering.
ref: Swagger Object
- swagger
- info
- host
- basePath
- x-ms-parameterized-host
- schemes
- consumes
- produces
- securityDefinitions
- security
- tags
- externalDocs
- paths (include x-ms-paths with with some marker)
- definitions
- parameters
- responses
- an other x- properties in alpha order
Note: retain OpenAPI structure — don’t nest swagger, info, … security within “General”
ref: Paths Object
- by path (key)
- any x- properties in alpha order
Note: Include entries of x-ms-paths, but we will want these to be marked in some way (TBD).
Q: Should paths be grouped by tag? By “operationGroup”? Not for now.
ref: Path Item Object
- parameters
- get
- put
- post
- patch
- delete
ref: Operation Object
- summary
- description
- operationId
- deprecated
- x-ms-long-running-operation
- x-ms-pageable
- tags
- externalDocs
- consumes
- produces
- security
- parameters
- responses
- x-ms-examples
- an other x- properties in alpha order
Q: Do we show the parameters at the path level within each operation ? Not for now, but eventually yes.
Q: Do we show “inherited” global consumes, produces, security ? Not for now, but eventually yes.
- maintain order in original document
ref: Parameter Object
- name
- x-ms-client-name
- in
- description
- required
- default
- x-ms-client-default
- type
- format
- items
- collectionFormat
- enum
- x-ms-enum
- minimum/maximum/minLength/maxLength/pattern/etc
- an other x- properties in alpha order
- numbered status codes in sorted order
- default
- x-properties in alpha order
ref: Response Object
- description
- headers
- schema
- examples
ref: Schema Object
-
type
-
format
-
properties
-
required
-
allOf
-
x-ms-client-name
-
title
-
description
-
required
-
default
-
x-ms-client-default
-
type
-
format
-
properties
-
additionalProperties
-
items
-
collectionFormat
-
enum
-
x-ms-enum
-
minimum/maximum/minLength/maxLength/pattern/etc
-
an other x- properties in alpha order
In alpha order by name.
Would be nice if the definitions were sorted in a "topological" way (cluster "child" definitions underneath parents as best possible)