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

Support for MicroProfile Open API properties #216

Closed
angelozerr opened this issue Feb 7, 2020 · 2 comments · Fixed by #252
Closed

Support for MicroProfile Open API properties #216

angelozerr opened this issue Feb 7, 2020 · 2 comments · Fixed by #252
Assignees
Labels
enhancement New feature or request properties Features supported in application.properties quarkus-jdt-extension
Milestone

Comments

@angelozerr
Copy link
Contributor

MicroProfile Open API provides some properties that we should supported. See

https://github.com/eclipse/microprofile-open-api/blob/master/spec/src/main/asciidoc/microprofile-openapi-spec.adoc#311-core-configurations

@angelozerr angelozerr added the properties Features supported in application.properties label Feb 7, 2020
@angelozerr angelozerr added this to the v0.0.6 milestone Feb 20, 2020
@fbricon fbricon removed this from the v0.0.6 milestone Feb 20, 2020
@angelozerr angelozerr added this to the v0.0.6 milestone Mar 11, 2020
@angelozerr angelozerr changed the title Support for MicroProfile Open API Support for MicroProfile Open API properties Mar 11, 2020
@angelozerr angelozerr changed the title Support for MicroProfile Open API properties Support for MicroProfile Open API properties Mar 11, 2020
@xorye
Copy link

xorye commented Mar 13, 2020

I have two questions about the OpenAPI properties:

My first question is that for the "prefix" properties:
image

Since they are just prefixes, I think they should be changed to mp.openapi.servers.path.{*}, mp.openapi.servers.operation.{*} and mp.openapi.schema.{*}. Would that be ok?

My second question is for the mp.openapi.schema. property. Supporting this property seems a bit more challenging because its value can spread multiple lines like so:

mp.openapi.schema.java.util.Date = { \
  "name": "EpochMillis" \
  "type": "number", \
  "format": "int64", \
  "description": "Milliseconds since January 1, 1970, 00:00:00 GMT" \
}

At the moment. if I copy and paste that content into an application.properties file, it looks like this:
image

It seems like the properties parser and the Quarkus Properties textmate grammar should be changed too?

@angelozerr
Copy link
Contributor Author

  • mp.openapi.servers.path.{*} : yes you can do that
  • mp.openapi.servers.operation.{*} : yes you can do that
  • and mp.openapi.schema.{} : no it will not work since {} is a feature from Quarkus mapped property. {} means that you can have any identifier (without '.'). And if you need '.' you must using qote like quarkus.log."com.redhat.quarkus" (quarkus.log.{})

Today there are no way to say that a property ends with any character (the case of mp.openapi.schema). Perhaps we should support it with a new syntax like {here you can fill it with a java regexp} ?

It seems like the properties parser and the Quarkus Properties textmate grammar should be changed too?

I'm afraid the answer is yes for both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request properties Features supported in application.properties quarkus-jdt-extension
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants