Skip to content

feat: --dry-run clarifies that if it fails on invalid id that the YAML is valid (create operation) #534

@michael-johnston

Description

@michael-johnston

Is your feature request related to a problem? Please describe.

When creating an operation YAML you must eventually put a correct space id and optional and actuator id.
However when writing example YAML for documentation you may only have a "fake" id.

The problem is ado create --dry-run will attempt to validate the fake id and fail, which is fine, but then it will not validate the parameters (or if it does, it does not say).

Describe the solution you'd like.

To have the validation emit Success/Error separately for the resource and the yaml format/parameters. This way even with a fake id the --dry-run will tell if the YAML structure and parameter names are ok

YAML with valid parameters but invalid id

Operation YAML: Success 
Resource Identifiers: FAIL (Usual error)

Wrong identifiers and wrong parameters

Operation YAML: Fail  (Usual Pydantic Error)
Resource Identifiers: Not tested as YAML failed to load

I imagine the YAML and the operation parameters are validated first. Then once that is valid the ids are tested.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions