Skip to content
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

Not showing range values in swagger #39

Open
jdillard opened this issue Dec 20, 2019 · 2 comments
Open

Not showing range values in swagger #39

jdillard opened this issue Dec 20, 2019 · 2 comments

Comments

@jdillard
Copy link
Contributor

I converted swagger-generator/src/test/resources/simplest.yang, which has an integer with a range of 1 to 4096:

typedef myint1 {
    type int32 {
        range 1..4096;
    }
  }

Although, in the swagger it isn't generating the minimum and maximum values associated with the integer as shown here: https://swagger.io/docs/specification/data-models/data-types/#range.

If anyone has tips on where to look, I can try and submit a patch.

@exgphe
Copy link

exgphe commented Mar 29, 2022

I implemented this feature as well as other missing properties in my fork. It's located in class TypeConverter. My fork is not crafted enough to patch into this project though.

Do mind that minimum and maximum in swagger are not equivalent to YANG's range, since YANG supports multiple ranges for a type.

@bartoszm
Copy link
Collaborator

@exgphe can I have at your fork and cherry pick appropriate changes ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants