Replies: 0 comments 1 reply
-
I'd like for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This idea came from a discussion with @achilleas-k about validating compose command requests and blueprints. I'll try to summarize things since pasting in the slack text just ends up being a mess.
@achilleas-k has a branch where he's been working on a way to validate things - https://github.com/achilleas-k/images/tree/config-validation and osbuild/images@a335ba9 which made me think of the blueprint openapi schema I added to cloudapi - https://github.com/osbuild/osbuild-composer/blob/main/internal/cloudapi/v2/openapi.v2.yml#L1217 leading to this half thought out proposal:
Use the openapi specification language to validate blueprints, starting with the current one in cloudapi which allows all the allowed things for any blueprint+image type combination. But then also have a version of the validation spec that is specific for each image type, since some of them require specific options to be included and others restrict what options can be used.
options
meaning blueprint keys, whether they are customizations or other things.Doing this would give us validation of the inputs, something we've needed, as well as documentation of what is allowed for each image type which has been a pain for users and documentation.
And if you were to then embed this per-image-blueprint-validation-openapi-spec in an otk metadata section (eg.
otk.metadata.blueprint.openapi
or whatever) you then have the ability to validate image compose requests and document them at the same time, as well as having the documentation and code always stay in sync.Beta Was this translation helpful? Give feedback.
All reactions