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
Models: Are ServerVariables really Extensible? #245
Comments
You are right - the |
Thank you for the quick feedback! Well I guess that removing Lines 25 to 30 in 7a28b39
I am wondering if this is possible for a |
I think the |
@EricWittmann : I totally agree, but this is not only a |
hey guys - I totally agree here. Probably just legacy stuff we can improve upon. How about we tackle this in #248, since that will probably eliminate |
I am not sure anymore about this. Maybe I found the corresponding method in KaiZen-Parser: Usage example: openApi3.getServers().get(0).setVariablesExtension("xxxx", "yyyy"); |
The more I look at it, the more confuse I get. I found the issue discussing if the ServerVariables are extensible or not: OAI/OpenAPI-Specification#975 => My understanding from Issue and from associated PR is that it was decided to not have extensions for server-variables. Current support in the java implementation KaiZen-Parser supports it. #245 (comment) Swagger-Core has code to support it but with commit swagger-api/swagger-core@5e61d6a they have mark it as deprecated and as far as I have tested it, Swagger-Parser do not parse server-variables extensions for the moment (could be an issue). Test spec: openapi: 3.0.1
info:
title: Test extensions
description: API under test
version: 1.0.7
servers:
- url: https://api.test.com:{port}/{username}
variables:
x-test1: extension test
port:
default: "9999"
username:
default: alice
enum:
- alice
- bob My proposition: Let ServerVariables extensible for the moment as the 2 java libs supports it. |
Thanks for digging the OAS history on this @jmini! I guess the summary is that Since it no longer exists in the spec, I think we should deprecate Each individual |
Agreed on Sept. 10 hangout with conclusion from #245 (comment) |
A Model Test for |
org.eclipse.microprofile.openapi.models.servers.ServerVariables
represents a map oforg.eclipse.microprofile.openapi.models.servers.ServerVariable
inorg.eclipse.microprofile.openapi.models.servers.Server
See spec: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#server-variable-object
I do not think that the map <variable-name, instance> is extensible. I know Swagger-Core has implemented it, but Kaizen Model did not and I think this is correct.
Map<String, ServerVariable>
, there is noServerVariables
interface.Of course
ServerVariable
is extensible.The text was updated successfully, but these errors were encountered: