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

many swagger validation errors but model seems ok #125

Open
onthebreeze opened this issue May 4, 2020 · 3 comments
Open

many swagger validation errors but model seems ok #125

onthebreeze opened this issue May 4, 2020 · 3 comments
Assignees

Comments

@onthebreeze
Copy link
Contributor

please try to general OpenAPI specification for the diagram called "PreferentialCoO" in the "Certificates" package of the mmt model file at https://github.com/edi3/edi3-transport/tree/develop/resources

Many swagger errors are generated - but I cant see anything wrong with the model.

@kshychko
Copy link
Contributor

kshychko commented May 4, 2020

@faizanvahevaria, I'll pick this one - there are missing values for enums. Will let you know if need any assistance.

@faizanvahevaria
Copy link
Contributor

faizanvahevaria commented May 4, 2020

Yes i found that enums lengh is zero so that swagger parser generates error

kshychko added a commit that referenced this issue May 4, 2020
@kshychko
Copy link
Contributor

kshychko commented May 4, 2020

I played a bit and came to the following solution:

  1. If the enumeration is present on the diagram - it gets included along with the values. This allows us to override the published code lists.
  2. If the enumeration is missing from the diagram but has a tag named "ref", it is included as a reference pointing to the address provided as the "ref" tag value.
  3. If the enumeration is missing and there is no "ref" tag, it is included with an empty "enum" array and the alert message is shown. The generated spec is invalid.

@onthebreeze, I think it is a working approach on how to manage your code lists or use published.
I'll publish MMT and ISO code and update the MMT project with "ref" tags.

kshychko added a commit that referenced this issue May 4, 2020
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