2

when backstage tries to process the following api component, it gives an error.

    apiVersion: backstage.io/v1alpha1
    kind: API
    metadata:
       name: angry-cats-api
      description: Lethal cats here
   spec:
      type: openapi
      lifecycle: production
      owner: user:guest
      definition:
        $yaml: https://github.com/anywhereinfo/openapi/blob/main/angrycats.yml

I get the following error

BuiltinKindsEntityProcessor threw an error while validating the entity api:default/angry-cats-api; caused by TypeError: /spec/definition must be string - type: string\n at DefaultLocationService.processEntities

Jimm
  • 8,165
  • 16
  • 69
  • 118

1 Answers1

0

The definition field needs a string value, so you have to import the file with the $text prefix instead of $yaml.

Marcus
  • 116
  • 5