Skip to content

Environment Variable fallback value renders } at the end of the string #1065

@bummzack

Description

@bummzack

I have the following in my config file:

servers:
  - url: "${MY_API_URL:-http://example.com}"
    description: API

Whenever I generate the documentation with this config there's a trailing } for the API URL:

Image

As you can see in the image, the URL is http://example.com}, but should be http://example.com

When I set the Environment-Variable, eg. by running:

MY_API_URL=https://something.org npx spectaql config.yml 

I get https://something.org://example.com} as output.

IMO the syntax for the parameter-expansion seems to be correct, as it seems to work as it should in a posix shell:

MY_API_URL=http://something.org && echo "${MY_API_URL:-http://example.com}"

I'm using spectaql version 3.0.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions