Single Entry Point for Codegen Updates & Support an Old V0 Inbounds Endpoint #62
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.
Why
I was working on updating the fulfillment-inbound-api to allow for both the newest version and the v0 endpoint.
This ensures that it isn't clobbered by the following
swagger-codegenrun on the fulfillmentInbound_2024-03-20.json. The clobbering is do to the version getting stripped out when naming the modules. V0 is still required for some operations even though most endpoints are deprecated.The Drift
I wanted to ensure all of this was working correctly. To do so I wrote some extra bash scripts to do the following:
pull_models.shsnapshots the upstreammodels/directory at a specific commit.codegen.shruns Swagger Codegen against that snapshot and writes generated output tolib/.hoist.shnormalizes shared runtime files and injects provenance headers.release.shcommits the generated artifacts and tags the release asamzn/selling-partner-api-models/<short_sha>, linking back to the exact upstream models commit.I found these very helpful and I feel they simplify updating versions going forward. They are designed to be idempotent so they don't do anything if we are already on the update.