-
Notifications
You must be signed in to change notification settings - Fork 13
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
Multiple APIs #853
Comments
How would we specify multiple APIs? I'm thinking something like an OpenAPI-collection.yaml file that has a list of references to OpenAPI files and (optionally) the paths to which they map. We would pass that to the CLI in place of the OpenAPI spec. I wonder if there's already an open standard for that. |
I poked around the OpenApi documentation and couldn't see anything for 2.0 or 3.0 that provided a mechanism for a collection of OpenAPI schemas. Can we just have multiple instances using succeeding filenames/urls?:
|
I'd rather do a config file in order to keep the CLI arguments from getting too verbose. If there's no standard we'll invent one. |
@pmcelhaney I could be wrong, but can't you just run counterfact multiple times on different apis now? At least when I tried it, it seemed to work. It seemingly generated the types and routes correctly. All I did was run counterfact successively with the same destination folder, and it seemed to work:
Adding a way to specify file wildcards would be really nice, something like |
It's true you can just run it multiple times but only one at a time unless you specify alternate ports. The desire here is to have multiple specs be served under a single port at the same time. |
That works for generating code ( |
I could see wanting it watching multiple files at once and serving them all from a single port. I don't know if |
Looking at this again.
Without changing the CLI we can only put one file in the
|
This last one gets my vote. Seems more explicit and clear. Using a wildcard might have broader consequences for a developer than they realize if it gobbles up more specs than intended. |
We have multiple internal/external services that we are mocking. It would be great to run the server over multiple generated clients (with different base URLs)
Originally posted by @kaikun213 in #823 (comment)
The text was updated successfully, but these errors were encountered: