You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have several REST services hidden as they are not user facing REST endpoints. We have been adding them to our application.yml file but certain properties can't be read from that file. The ones that can be read this way include mp.openapi.extensions.smallrye.XXX. The ones that can't be read this way include mp.openapi.scan.exclude.XXX.
We found that the only way to read the latter ones is to include them in the microprofile-config.properties file. This is undesirable for two reasons. Properties can't be specified in just one file, and microprofile-config.properties requires them in CSV list which is very hard to read.
Also what we would really like is an class level annotation to do the same. Originally I thought @Schema(hidden = true) would work but it doesn't work at the class level.
Upon further investigation it appears the problem is that it can't read the properties that are Lists in YAML files. If we put the CSV string in the YAML file then it can read it. But it should be able to read lists in YAML format in YAML files.
The text was updated successfully, but these errors were encountered:
To summarize, the issue is that mp.openapi.scan.exclude is not being read when the value is a list - but it is being read properly when it is a string?
Yes both mp.openapi.scan.exclude.classes & mp.openapi.scan.exclude.packages do not work in YAML format when specified as a list, but if specified as CSV string then it works.
However IMHO mp.openapi.scan.exclude.classes should have a class level annotation that hides the class so this property would not be required. E.g. @Schema(hidden = true) @operations(hidden = true) can be hidden so why not the class as well? Note we can't just add @operations(hidden = true) to all methods because when the class is hidden it includes inherited methods (but only when the class is hidden).
We have several REST services hidden as they are not user facing REST endpoints. We have been adding them to our application.yml file but certain properties can't be read from that file. The ones that can be read this way include mp.openapi.extensions.smallrye.XXX. The ones that can't be read this way include mp.openapi.scan.exclude.XXX.
We found that the only way to read the latter ones is to include them in the microprofile-config.properties file. This is undesirable for two reasons. Properties can't be specified in just one file, and microprofile-config.properties requires them in CSV list which is very hard to read.
Also what we would really like is an class level annotation to do the same. Originally I thought @Schema(hidden = true) would work but it doesn't work at the class level.
Upon further investigation it appears the problem is that it can't read the properties that are Lists in YAML files. If we put the CSV string in the YAML file then it can read it. But it should be able to read lists in YAML format in YAML files.
The text was updated successfully, but these errors were encountered: