codegen: add OpenAPI spec parser (PRINFRA-121) - #12
Closed
somanshreddy wants to merge 1 commit into
Closed
somanshreddy wants to merge 1 commit into
somanshreddy wants to merge 1 commit into
Conversation
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Mar 31, 2026
PRINFRA-121 CLI M1: OpenAPI codegen pipeline
Build the code generation pipeline that reads Scope
Mapping Rules
Acceptance Criteria
|
somanshreddy
force-pushed
the
03-31-codegen_add_openapi_spec_parser
branch
from
March 31, 2026 19:41
5b95564 to
735c417
Compare
somanshreddy
force-pushed
the
03-31-codegen_add_overrides_system_for_group_renames_skip_patterns_positional_promotions
branch
from
March 31, 2026 19:41
0963cc3 to
24ee2cb
Compare
Reads OpenAPI JSON, resolves \$ref references, extracts endpoints with params and body fields. Handles Pydantic nullable pattern (anyOf with null), classifies body fields as simple (→ flag) or complex (→ skip), detects pagination (has_more + token field), detects multipart. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
somanshreddy
force-pushed
the
03-31-codegen_add_openapi_spec_parser
branch
from
March 31, 2026 20:08
735c417 to
3511ac2
Compare
somanshreddy
changed the base branch from
03-31-codegen_add_overrides_system_for_group_renames_skip_patterns_positional_promotions
to
graphite-base/12
March 31, 2026 20:59
Collaborator
Author
|
Closed — parser merged into grouper. kin-openapi types used directly, no intermediate ParsedEndpoint. |
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.

Description
Reads an OpenAPI 3.1 JSON spec and extracts the structured data needed for CLI command generation. This is the first stage of the codegen pipeline: raw spec → parsed endpoints.
Key parsing behaviors:
Output is a flat list of parsed endpoints. The grouper (next PR) organizes them into command groups.
Testing
Tested via golden file tests in a later PR. The parser is exercised by the full pipeline test with a mini OpenAPI spec covering all patterns.
Files
codegen/parser.go— Parse(), $ref resolution, field classification, pagination/multipart detection, x-cli-visible filtering