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

Create separate OpenAPI specs for different packages. #1669

Closed
kyngs opened this issue Dec 3, 2023 · 4 comments
Closed

Create separate OpenAPI specs for different packages. #1669

kyngs opened this issue Dec 3, 2023 · 4 comments

Comments

@kyngs
Copy link

kyngs commented Dec 3, 2023

(I'm a newbie and I'm not sure whether this is possible, or whether this is a request for this repository, or https://github.com/eclipse/microprofile-open-api/)

I have the following folder structure for my resources:

api/
├─ v0/
│  ├─ Example V0 Resource
├─ v1/
│  ├─ Example V1 Resource

Currently, the V0 a V1 resources would get put into the same openapi spec. I believe it would be optimal to have a separate spec for the v0 package and a separate spec for the v1 package.

Is it possible to do this? If not, why not?

Sorry for my ignorance if I'm missing something here

@Postremus
Copy link
Contributor

The maven plugin provides the scanProfiles and scanExcludeProfiles options. These can be used to selectivly include classes for one execution of the plugin.

Was implemented in #967.

@kyngs
Copy link
Author

kyngs commented Dec 3, 2023

The maven plugin provides the scanProfiles and scanExcludeProfiles options. These can be used to selectivly include classes for one execution of the plugin.

Was implemented in #967.

So there's no possible way for me to do this with Gradle?

@Postremus
Copy link
Contributor

@kyngs I had a look around, and the properties are at least present in the config class for the gradle plugin.
https://github.com/smallrye/smallrye-open-api/blob/main/tools/gradle-plugin/src/main/java/io/smallrye/openapi/gradleplugin/Configs.java#L61

No idea how to configure it atm tough, sorry - never worked with gradle myself.

@kyngs
Copy link
Author

kyngs commented Dec 9, 2023

@kyngs I had a look around, and the properties are at least present in the config class for the gradle plugin. https://github.com/smallrye/smallrye-open-api/blob/main/tools/gradle-plugin/src/main/java/io/smallrye/openapi/gradleplugin/Configs.java#L61

No idea how to configure it atm tough, sorry - never worked with gradle myself.

Pheew, I'm using the quarkus-smallrye-openapi for Quarkus, so I suppose I should go ask there. Thanks for your help tho.

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

2 participants