Repository navigation
feat: SchemaRef and RenameSchemasFunc, which notion and pixellab both write - #19
Merged
Merged
Conversation
MoveToComponents, SchemaRef, RenameSchemasFunc and MergeSchemas, which go-api-libs/notion and pixellab each wrote to shape their specification, and RemoveNullAlternatives and RemoveEmptyJSON, which undo what FastAPI writes. Both libraries generate the same specification and code with these as with their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QCb1AfnATvpBQCH3PrX7Y
SchemaRef and RenameSchemasFunc stay: notion and pixellab both build references and rename by a rule. MoveToComponents is notion's alone, and MergeSchemas is Replace and RedirectSchemas. RemoveNullAlternatives is no longer needed, now that codegen and flatten read X or null as X, and RemoveEmptyJSON is pixellab's alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QCb1AfnATvpBQCH3PrX7Y
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two helpers that go-api-libs/notion and pixellab each wrote for themselves:
SchemaRef(doc, name): a$refschema pointing at a component, with itsValueset. notion'srefToand pixellab's hand-built references inreferPlainStringsandnarrowRefsare the same thing.RenameSchemasFunc(doc, rename): renames every component by a rule, throughRenameSchemas. notion'sstripSuffixesand pixellab'sgoNameseach build the map themselves.Left out, because only one library uses each of them or they're no longer needed:
MoveToComponents: notion's alone (openapi-flatten's version picks a free name instead).MergeSchemas: is justReplaceplusRedirectSchemas.RemoveNullAlternatives: no longer needed once openapi-codegen#72 and openapi-flatten#13 are in, since they readX or nullasX.RemoveEmptyJSON: pixellab's alone.Tests
make readypasses.🤖 Generated with Claude Code
https://claude.ai/code/session_019QCb1AfnATvpBQCH3PrX7Y