I am trying to merge the additional files schema in micronaut swagger UI. I think the file is not picked up during the build time, quite not sure how to set the correct path for the additional file.
Inside resource the additional file is present
In the application.yml configuration I have set the below configuration
micronaut:
openapi:
additional:
files= src/main/resources/swagger/swaggerSecuritySchemes.yml
swaggerSecuritySchemes.yml
securitySchemes:
Open Id Connect:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://falconidentityserver.azurewebsites.net/connect/authorize
tokenUrl: https://falconidentityserver.azurewebsites.net/connect/token
refreshUrl: ""
scopes:
openid: Open Id scope
profile: Name scope
email: Email scope
usePkceWithAuthorizationCodeGrant: true
In the build swagger yml file, those configuration are not present, I think the file is not picked during the build process, how do we set the path for additional files
From the micronaut documentation
micronaut.openapi.additional.files={project.home}/src/test/resources/swagger
what is project.home
?
I tried the below code in the build.gradle file, but it didn't merge anything from the other file
tasks.withType(JavaCompile).all {
options.fork = true
options.forkOptions.jvmArgs << '-Dmicronaut.openapi.views.spec=swagger-ui.enabled=true,swagger-ui.theme=MATERIAL'
options.forkOptions.jvmArgs << '-Dmicronaut.openapi.additional.files=src/main/resources/swagger'
options.compilerArgs += ['--enable-preview']
}
Update 1
components:
securitySchemes:
Open Id Connect:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://falconidentityserver.azurewebsites.net/connect/authorize
tokenUrl: https://falconidentityserver.azurewebsites.net/connect/token
refreshUrl: ""
clientId: xxxxxxxxxx
clientSecret: xxxxx-xxxxxxxxxxxxx
scopes:
openid: Open Id scope
profile: Name scope
email: Email scope
usePkceWithAuthorizationCodeGrant: true
Including the above definition merged the configuration, however on final document the clientId, clientSecret and usePkceWithAuthorizationCodeGrant are not merged, why?