Skip to content

SwaggerEditor@next(legacy): add env support to Dockerfile #3270

Open
@tim-lai

Description

Feature parity with legacy SwaggerEditor@4:

  • accept url
  • accept local file

Out of scope, but consistency with SwaggerUI:

  • generic list of args to pass as props

Additional context:

  • CRA requires static files to be located in the public/static directory.
  • CRA accepts env flags, but these env flags are set at build time and non-mutable afterwards.
  • Will likely to need to add code checks for supported env variables.

Notes:

  • legacy swagger-editor only contains SWAGGER_FILE AND URL env variables, with no other consideration of swagger-ui.
  • legacy swagger-editor implementation does not appear to be directly portable.

From readme in this PR, which enables the basic environment variable, #3200:

Building a Docker container with custom environment variables is not currently supported by SwaggerEditor. This is due to the inability of npm to handle scoped packages that are outside of the public npm registry. In the case of SwaggerEditor, @swagger-api/apidom-ls is a dependency currently only residing in Github packages. It is in the roadmap to make @swagger-api/apidom-ls, as well as this version of SwaggerEditor, available in the public npm registry.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions