Open fiewski opened 2 weeks ago
Is there a way to generate the document without necessarily running the application?
There is not - this is fundamentally how OpenAPI generation works. The application is run so that all your filters, versioning, etc. is applied to the document. Only reflection isn't sufficient.
You'll need to make your application "generator aware" so that it doesn't use/need the bits that won't work outside of your real deployed application when the OpenAPI document is generated.
Possible solutions:
Development
/Production
OPENAPI_GENERATOR=true
)Then given which way you want to check for "is generator", conditionally not include SSM as a configuration source.
What are you wanting to achieve?
Hello guys,
I'm trying to generate the documentation through the Swagger CLI, but my application has a call to the AWS Secret Manager. Therefore, when I'm building the application, the Swagger ToFile returns an error when querying the AWS service. Is there a way to generate the document without necessarily running the application?
What code or approach do you have so far?
Project csproj
Output error:
My Program.cs, I'm placing the call to the aws secret manager as an IConfigurationSource
Additional context
No response