Skip to content

Only Include Public APIs & Their Schemas#229

Merged
ihassanein merged 1 commit into
mainfrom
iman/filter-private-endpoints-from-openapi
Jul 8, 2026
Merged

Only Include Public APIs & Their Schemas#229
ihassanein merged 1 commit into
mainfrom
iman/filter-private-endpoints-from-openapi

Conversation

@ihassanein

Copy link
Copy Markdown
Contributor

Whenever someone runs the generate scripts for the first time they get intimidated by the massive diff this creates. It's a two-fold issue:

  1. When we generate the *openapi.json files the V4 includes all the endpoints not just public ones. In all cases we also keep schemas that are used by private endpoints.
  2. Since all the endpoints are there, we generate a TON of pages when you run the page generation script.

This inspired me to add more post-processing to filter on a tag we already include in V4 endpoints 🎉 V2 and V3 already only include routes we want to document so they are unaffected by this post-processing step.

When testing I saw the diff was still massive, so I further added a step to remove unused schemas (these are typically for our private endpoints so they are not going to be referenced)

Let me know what you think, I did this between tasks using Claude to write the code and I triple checked that the behaviour made sense as well as ran the local docs and clicked everywhere to assure no references were broken by this change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed as it is not a public api endpoint and was likely kept by mistake as it has not been added to docs.json

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed as it is not a public api endpoint and was likely kept by mistake as it has not been added to docs.json

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed as it is not a public api endpoint and was likely kept by mistake as it has not been added to docs.json

@ihassanein ihassanein merged commit c523867 into main Jul 8, 2026
6 checks passed
@ihassanein ihassanein deleted the iman/filter-private-endpoints-from-openapi branch July 8, 2026 20:29
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