-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
Generate subset of schema #1682
Comments
Have you tried using the Redocly config to do this? I don't know anything about Redocly, but here's what I have found which I have not tested yet... If I do test it and it works, I'll put the answer here as well as in discussion #1655
The The |
Actually the With this, you can annotate your OpenAPI schemas with a property like According to the Redocly cli readme:
|
Welp, this didn't work at all. It seems like decorators are not supported or something. When I used the following apis:
main:
root: http://localhost:43020/api/v1/docs/json
x-openapi-ts:
output: ./src/api.ts
decorators:
filter-in:
property: operationId
value: [connectRepo]
rules:
operation-operationId-unique: error
operation-parameters-unique: error
path-not-include-query: error
spec: 3.0 I suppose my next step might be to just use |
OK I didn't stop there. The workaround that I described above should have worked because redocly produces a new Here's what I tried basically: install the Steps:
apis:
main:
root: http://localhost:43020/api/v1/docs/json
decorators:
filter-in:
property: operationId
value: [connectRepo]
rules:
operation-operationId-unique: error
operation-parameters-unique: error
path-not-include-query: error
spec: error
apis:
main:
root: api.yaml
x-openapi-ts:
output: ./src/api.ts NOTE: This |
I got my workaround working by skipping the use of the openapi-typescript ./api.yaml -o ./src/api.ts So my full package script command is now: REDOCLY_TELEMETRY=off redocly bundle main --config=start.yaml -o api.yaml &&
openapi-typescript ./api.yaml -o ./src/api.ts &&
rm ./api.yaml As you can see I added a third part of that command to So, with that, I have successfully gotten |
Description
I've OpenAPI schema with multiple the security schemes. Some paths are public and some are internal.
How to get types for public paths (methods) only?
Proposal
May be we can add an option to filter by path, tags or operation id?
The text was updated successfully, but these errors were encountered: