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

Allow automatic discovery of OpenAPI spec files #193

Conversation

sideeffffect
Copy link
Contributor

No description provided.

Copy link
Member

@blast-hardcheese blast-hardcheese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a really neat idea.

Initially I rejected the possibility of automatically generating clients and servers from files discovered in a directory because I thought more people would need to supply bespoke arguments for each generated client or server, but I like how this still gives control in a generic way.

Do you think it's going to be necessary to filter out files that have an explicit configuration stanza for them, for files that require custom arguments or other workarounds?

Co-authored-by: Devon Stewart <blast@hardchee.se>
@sideeffffect
Copy link
Contributor Author

Do you think it's going to be necessary to filter out files that have an explicit configuration stanza for them, for files that require custom arguments or other workarounds?

I think the scheme is very flexible. You get a DiscoveredFile and are supposed to return a List of GuardRailTasks. That means you can inspect the file, return an empty list to filter it or anything in between.

@sideeffffect
Copy link
Contributor Author

ping 😸

@blast-hardcheese
Copy link
Member

@sideeffffect Hey, I was trying to figure out what didn't work about the default stuff. I use that functionality all the time with the CLI, I was really surprised to see it not work here, but that shouldn't block your PR. Sorry about that

@blast-hardcheese blast-hardcheese merged commit 669b600 into guardrail-dev:master Aug 21, 2022
@sideeffffect sideeffffect deleted the guardrailDiscoveredOpenApiFiles branch August 21, 2022 21:43
@sideeffffect
Copy link
Contributor Author

❤️

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

Successfully merging this pull request may close these issues.

2 participants