Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI 3.1 #6076

Closed
achrinza opened this issue Aug 9, 2020 · 1 comment
Closed

OpenAPI 3.1 #6076

achrinza opened this issue Aug 9, 2020 · 1 comment

Comments

@achrinza
Copy link
Member

achrinza commented Aug 9, 2020

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.

@raymondfeng
Copy link
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, ...

@bajtos bajtos closed this as completed Mar 11, 2021
@loopbackio loopbackio locked and limited conversation to collaborators Mar 11, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

3 participants