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 IDocumentFilter #340

Closed
ThomasBleijendaal opened this issue Dec 29, 2021 · 2 comments · Fixed by #344
Closed

Support for IDocumentFilter #340

ThomasBleijendaal opened this issue Dec 29, 2021 · 2 comments · Fixed by #344
Labels
documentation Improvements or additions to documentation enhancement New feature or request v1.3.0

Comments

@ThomasBleijendaal
Copy link
Contributor

With other Swagger / OpenApi systems it used to be possible to implement something like an IDocumentFilter and have the possibility to modify the document before it is rendered. I want to switch to this package as it has support for the newer Azure Function runtimes, but I kinda need the functionality of an IDocumentFilter. For example, I use that filter for modifying the path of an http function, as I use the swagger document to generate ARM templates for Azure API Management.

Is this something that is on the roadmap, or desirable at all?

I would imagine to allow for configuring something of a IDocumentFilter in either DI or some configuration object, and have the functions like https://github.com/Azure/azure-functions-openapi-extension/blob/main/src/Microsoft.Azure.WebJobs.Extensions.OpenApi/OpenApiTriggerFunctions.cs#L59 use those filters after generating the IDocument and right before calling RenderAsync.

If it sounds like a good idea I would give it a try and open a PR. I haven't looked into every detail yet, so perhaps its a bit more complicated that what I describe above.

@morrisonbrett
Copy link

I need this too. Because of the limitations of how the app.Swagger() is not available in the Azure Function startup harness, we need more ability to implement interfaces such as IOpenApiConfigurationOptions.

@justinyoo
Copy link
Contributor

Related to #344

@justinyoo justinyoo added documentation Improvements or additions to documentation enhancement New feature or request v1.3.0 labels Mar 23, 2022
@justinyoo justinyoo added this to the Release 202203 - v1.3.0 milestone Mar 23, 2022
@justinyoo justinyoo linked a pull request Mar 23, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request v1.3.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants