-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support $yaml
and $json
fields in API Kind definitions
#45
Comments
Amending this slightly because I found that |
$yaml
, $json
and $text
fields in API Kind definitions$yaml
, $json
and fields in API Kind definitions
$yaml
, $json
and fields in API Kind definitions$yaml
and $json
fields in API Kind definitions
Hey, it is confusing, however the linked docs generally talks about the addition of these processors to Backstage, and gives an example with an entity Kind: API. In the case of these substitutions the preprocessor would create a json object to the definition, but the definition should be a json string. That's why it fails. |
Yeah, I have a little more context on this now and I realize that the processor essentially reads and parses the contents of these kind: API
...
spec:
...
definition:
$yaml: https:///www.example.com/path/to/an/api/definition.yaml # Does not inline into a string This is probably why they're failing to inline correctly and the validator is treating them as objects. I've never actually seen these work when I try examples like the above. Is it correct to assume the validator is running some kind of code to inline |
To piggyback off of this one, running into the same issue, but whilst trying to implement an OpenAPI spec.
The above will fail validation with the following error:
I have verified that this does indeed work within Backstage whilst pointing to an OpenAPI spec |
Describe Request:
When validating entries with
Kind: API
, the validator only checks for astring
type on thespec.definition
field at the moment. The backstage model however has added limited support for object types on the definition field when the keys are one of the following:$json
$yaml
$text
Examples:
From the Backstage Documentation
Supporting Documentation Links:
https://backstage.io/docs/features/software-catalog/descriptor-format#substitutions-in-the-descriptor-format
The text was updated successfully, but these errors were encountered: