-
Notifications
You must be signed in to change notification settings - Fork 83
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
[OAS 3.1.0] New restrictions on ServerVariable.enum #593
Comments
tck/src/main/java/org/eclipse/microprofile/openapi/tck/ModelConstructionTest.java This test modifies the enum list, but never sets a default so the ServerVariable will be in an illegal state. (It also raises the question of intermediate values. If you want to remove the defualt from the enum, add a new value, snd set the new value to the default. Is it required to ensure the default is in the enum at every step of the process?) The following tests use ServerVariable in line with the rule tck/src/main/java/org/eclipse/microprofile/openapi/apps/airlines/JAXRSApp.java - enumeration is unset. tck/src/main/java/org/eclipse/microprofile/openapi/apps/airlines/resources/ReviewResource.java - enumeration is set, default is set and in the enumeration. tck/src/main/java/org/eclipse/microprofile/openapi/reader/MyOASModelReaderImpl.java - enumeration is set, default is set and in the enumeration. The following files only mention ServerVariable api/src/main/java/org/eclipse/microprofile/openapi/models/servers/Server.java |
No, I don't think this is required, the object being in an invalid intermediate state is fine. |
I spoke with Andrew yesterday and learned that we do not add TCK tests for illegal states. Given that, and the results of my audit above, I think this issue only needs an update to the documentation. |
I think we should doc that |
Two new restrictions are added to
ServerVariable.enum
:enum
is defined it may not be emptyenum
is defined then the value set fordefault
must be found withinenum
We should
The text was updated successfully, but these errors were encountered: