Repository navigation
Vanguard: Allow jobs that render a template URL - #3
Merged
Merged
Conversation
The API renders either an uploaded template (template.id) or a template URL (template.src, with template.name), but the vendored spec marked id as required and the CLI refused any job without it. The JobTemplate schema is synced from nexrender-api (id optional, name documented) and the generated client regenerated. Validation now asks for exactly one of template.id or template.src, and for template.name with template.src. Found by Vanguard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
The API can render either an uploaded template (
template.id) or a template at a URL (template.srcplustemplate.name). The CLI only allowed the first:validate.JobPayloadrequiredtemplate.id, and the vendored spec markedidas required.JobTemplateschema is synced from nexrender/nexrender-api#186.idis optional andnameis documented.internal/api/api.gen.gois regenerated with the pinned generator;JobTemplate.Idis now*string, andNameis a typed field.template.idortemplate.src. Withsrc,template.nameis required: the.aep/.mogrtfile name, or the.aeppath inside a.zip. These match the API's own 400s (MISSING_TEMPLATE_ID,TEMPLATE_SRC_ID_CONFLICT, missing name), but are caught locally, including under--dry-run.template{ id }{ src, name }template.id is required{ id, src }{ src }withoutnametemplate.id is requiredtemplate.name is required with template.srcThis repository only has
main, so the PR targets it. It should merge after the API spec PR, nexrender/nexrender-api#186, but it doesn't depend on that PR at runtime because the API already acceptssrc.Found by Vanguard, the new end-to-end suite.
Testing
go generate ./internal/api,gofmt -l(clean),go vet ./...,go test ./...,go build ./cmd/nexrender.srcwithoutnameare rejected. It uses the public example templatehttps://nx1-assets-eu.nexrender.com/example/Test%20AEP.zip.