question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Supporting OpenAPI 3.1

See original GitHub issue

Some progress seems to have (finally!) be made on @apidevtools/swagger-parser. There is now a release 10.1.0 that should allow OpenApi 3.1 to be parsed. Does this mean Orval could be updated to be compatible or is there still more that is needed with dependencies?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
OliverDudgeoncommented, May 14, 2022

Also the tests pass. I’ve tried it with a few different configs without issues. Seems like an easy upgrade? Maybe give it a few days for any reports to come through on @apidevtools/swagger-parser (it also has a PR that’s been merged since the release so there might be another patch incoming)

0reactions
geirsagbergcommented, Nov 6, 2022

Seems like the nullable part of 3.1 is not yet supported? From https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0

In line with JSON Schema, the type keyword can now define multiple types for a schema with an array. This is useful new functionality, but has also made nullable redundant. In order to achieve the goal of letting JSON Schema tools understand OpenAPI, it was decided to remove nullable entirely instead of deprecate it.

# OpenAPI v3.0
type: string
nullable: true

# OpenAPI v3.1
type:
- "string"
- "null" 

When I generate code from an OpenAPI 3.1 endpoint, I get nullables as foo: unknown | string

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenAPI 3.1 - What's New and How to Migrate to/from Other ...
We are excited to announce the support for OpenAPI 3.1 as APIMatic's latest supported API specification format, which can be used throughout ...
Read more >
Stoplight Now Supports OpenAPI 3.1 Documents
Now, Stoplight has taken the first step to support OpenAPI 3.1 documents with our current features, tools, and functionality.
Read more >
OpenAPI Specification 3.1.0 Released
This new version now supports 100% compatibility with the latest draft (2020-12) of JSON Schema. Along with this release, the OpenAPI Initiative ...
Read more >
OpenAPI-Specification/3.1.0.md at main - GitHub
The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to HTTP APIs which allows both humans and computers to discover and understand ...
Read more >
Add support for OpenAPI 3.1 in OpenAPI Specifications plugin
OpenAPI 3.1.0 should be supported. OpenAPI 3.1.0 was released over a year ago, February 16, 2021. It is time to support it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found