Skip to content

Applying a Spec resource from standard input doesn't upload the spec #1227

@jonblack

Description

@jonblack

Given the following Spec resource in the file resource.yaml:

apiVersion: apigeeregistry/v1
items:
  - apiVersion: apigeeregistry/v1
    kind: Spec
    metadata:
      name: reg-supplier
      parent: apis/reg-supplier/versions/1.0.0
    data:
      filename: regsupplier-app/target/openapi.json

It's successfully published to the registry when running:

registry apply -f resource.yaml

When applying the resource from standard input the specification is created with the filename in the resource; however, the specification content is not published.

RESOURCE=$(cat resource.yaml)
echo "$RESOURCE" | registry apply -f -

GetApiSpecContents when using gRPC UI returns the following:

{
  "content_type": "",
  "data": "",
  "extensions": []
}

I would expect the specification content to be uploaded when applying from standard input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions