Skip to content

openapi: fix assertion to new-model in /v2/model#368

Closed
BAMF0 wants to merge 1 commit into
canonical:mainfrom
BAMF0:367-fix-model-post-json
Closed

openapi: fix assertion to new-model in /v2/model#368
BAMF0 wants to merge 1 commit into
canonical:mainfrom
BAMF0:367-fix-model-post-json

Conversation

@BAMF0

@BAMF0 BAMF0 commented Jun 11, 2026

Copy link
Copy Markdown

Change the /v2/model POST example JSON to use the new-model field instead of assertion, as this is what is expected by snapd for API calls.

Reference: https://github.com/canonical/snapd/blob/49b363c11dc2c79213aa466d9898dc3bd779287f/daemon/api_model.go#L67

Fixes #367

@Rnfudge02 Rnfudge02 self-requested a review June 15, 2026 12:56
@Rnfudge02

Copy link
Copy Markdown
Contributor

Thank you for the fix Simon!

@Rnfudge02

Copy link
Copy Markdown
Contributor

Note: The openapi bundled with snap-docs is an old version to be displayed when the latest implementation does not build. I will make sure the changes are mirrored there if they haven't been already committed. The up-to-date documentation is in the snapd repo under docs for future reference for anyone who sees this.

@Rnfudge02

Copy link
Copy Markdown
Contributor

This is now being tracked by: canonical/snapd#17199

@Rnfudge02

Copy link
Copy Markdown
Contributor

Closing, need to update bundled openapi spec in snap-docs repo at some point.

@Rnfudge02 Rnfudge02 closed this Jun 15, 2026
@BAMF0

BAMF0 commented Jun 15, 2026

Copy link
Copy Markdown
Author

Awesome! Mirroring it from the snapd repo is more reasonable than manual edits.

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.

docs: POST /v2/model shows incorrect JSON field in example

2 participants