Skip to content

OpenAPI 3.1 #6076

Closed
Closed

Description

@achrinza

This issue is to start a discussion on how to go forward with implementing OpenAPI 3.1 once it hits GA.

OpenAPI 3.1.0-rc0 was "recently" released. It brought about new, breaking changes that may affect LoopBack 4's development.

Most notably (but not limited to):

  • Full support for JSON Schema Draft 2019-09 primitive types and Schema Object
  • Semver dropped
  • OpenAPI 3-specific implementation was dropped in favour of JSON Schema (e.g. exclusiveMinimum and exclusiveMaximum are now numbers)

Potential discussion points:

  • This would cause a cascading effect where LoopBack 4 components will have a breaking change.
  • What about external tooling (e.g. oas generators)? Should we be able to generate both OAS 3.0 and OAS 3.1 spec?

AJV support for JSON Schema Draft 2019-09 is underway:

Full Release Changelog:

Suggestion

Update codebase to utilize OpenAPI 3.1.

Use Cases

Some immediate benefits:

  • No conversion between OAS3-flavor and original JSON Schema spec
    • Reduced complexity and confusion
  • Future-proofing LoopBack 4 for future versions of OpenAPI 3

etc.

Examples

N/A

Acceptance criteria

TBD - will be filled by the team.

Activity

  1. raymondfeng commented on Aug 12, 2020

    @raymondfeng
    Contributor

    @achrinza Great initiative. It's great to see schemas in OpenAPI 3.1 are aligned with JSON Schema. There is one less mapping to be worried about. I guess switching to OpenAPI 3.1 for LB runtime is fairly easy. The challenge is to wait for other libraries to catch up - such as Swagger UI, Swagger parser, AJV, ...

  2. locked and limited conversation to collaborators on Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions