swagger-api / swagger-api/swagger-parser

Question - to know openApiVersion

Open
#1,759 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
867
Forks
560
Avg merge
2d 21h
Merged PRs (30d)
7

Description

After the resolving of OpenAPI specification, the version shows always as 3.x something, if we check in the result. There is no way of knowing after the spec is resolved, that whether the spec was originally 2.x or 3.x , that is whether it had a swagger key or openapi key.

Is there a boolean or a way to know what is the openapi spec version, after the swagger parser has resolved the spec ?

Thanks,

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the swagger parser's resolved specification result and the code path that performs resolution. Check how inputs using the swagger key and the openapi key are represented afterward, then determine and document or expose a way to identify the original version. Verify the result with both 2.x and 3.x specifications.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.