[TFgen] Added a parser to load the OAS#3851
Merged
Merged
Conversation
Member
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 Jun 2, 2026
7ed2d25 to
20016cd
Compare
3e85006 to
1b6e7b3
Compare
14c59b8 to
d5f2edb
Compare
1b6e7b3 to
973ef8f
Compare
8be55d8 to
0aec356
Compare
2 tasks
eb53a77 to
2aa560f
Compare
This comment has been minimized.
This comment has been minimized.
973ef8f to
5208b2a
Compare
301490f to
5eb0064
Compare
5208b2a to
22ee648
Compare
Base automatically changed from
thibault.viennot/generator-v2/translator
to
generator-v2
June 3, 2026 12:26
5eb0064 to
bf3cc22
Compare
bf3cc22 to
10f43de
Compare
This was referenced Jun 3, 2026
Added the parser's test data do `testdata/parser`
LoadSpec now resolves the component schema graph before enumerating: a circular $ref returns a typed *RefCycleError naming the offending ref, and expansion past --max-depth returns a depth error. The --max-depth flag is now wired through the generate command.
- Added better fixture coverage for allOf / anyOf - Added custom error for when max depth is reached in cycles.go
cd57259 to
b98b820
Compare
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.

Changes
Adds the OpenAPI spec loader for the v2 generator.
parser.LoadSpecparses the Datadog OAS via libopenapi v3 into the internalmodel.Specandmodel.Operation, enumerating every operation sorted by (path, method) so generated output is deterministic across runs.Cycle detection lives in the same file walk:
LoadSpecresolves the component schema graph and fails fast on an unresolvable spec:$refreturns a typed*RefCycleErrornaming the offending ref, and$refchain deeper than--max-depth(default 8) returns a depth error.The
--max-depthflag is wired through the generate command.Test Plan
New coverage: deterministic-ordering regression, typed cycle error (self / indirect / allOf / additionalProperties / array-items), --max-depth bound, and the cycleWalker state machine.