Skip to content

Fixes #16: Describe FileVar multipart uploads in the run schema - #70

Merged
jnovinger merged 1 commit into
mainfrom
16-the-rest-run-schema-does-not-describe-filevar-multipart
Oct 29, 2026
Merged

jnovinger merged 1 commit into
mainfrom
16-the-rest-run-schema-does-not-describe-filevar-multipart

Conversation

@pheus

@pheus pheus commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes: #16

The run schema reused the JSON request definition for multipart requests, leaving FileVar uploads undocumented. This adds a separate multipart schema with data as a JSON object encoded as a string and uploads as binary parts named after their variables.

Schema tests cover both request formats and their shared run parameters.

The run action's OpenAPI schema now declares a separate multipart
body. Its data field is a JSON object encoded as a string, and each
FileVar upload is a binary part named after its variable. The JSON
body and the runtime validation are unchanged.

Fixes #16
@pheus
pheus marked this pull request as ready for review October 29, 2026 13:26
@pheus
pheus requested a review from jnovinger October 29, 2026 13:26
)


class NetBoxScriptRunMultipartInputSerializer(NetBoxScriptRunInputSerializer):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as I'm not required to remember this name 😛

@jnovinger
jnovinger merged commit f36f698 into main Oct 29, 2026
20 checks passed
@jnovinger
jnovinger deleted the 16-the-rest-run-schema-does-not-describe-filevar-multipart branch October 29, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The REST run schema does not describe FileVar multipart uploads

2 participants