Skip to content

Make openapi3 output consistent in ordering #2293

@mikekistler

Description

@mikekistler

Currently object properties are emitted in the order of the JS properties which depends in which order they are added to the object.

This means an implementation change can change the order of emitted properties, which is undesirable.

See the corresponding issue and fix for the autorest emitter.

The ordering for autorest (OpenAPI v2) should largely work for OpenAPI v3, but there is one thing to call out. The requestBody property currently appears after responses (because of the order they are added to the JS object), but in the order output requestBody should come before responses. This is based on input from an external adopter of TypeSpec/openapi3.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions