Skip to content
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

Improve the default redocly.yaml file #25

Closed
adamaltman opened this issue Mar 23, 2022 · 3 comments
Closed

Improve the default redocly.yaml file #25

adamaltman opened this issue Mar 23, 2022 · 3 comments

Comments

@adamaltman
Copy link
Member

adamaltman commented Mar 23, 2022

What should we improve?

We offer a default Redocly configuration file when we detect an openapi definition.

How should we improve it?

  1. Rename it from .redocly.yaml to redocly.yaml.
  2. Replace the contents of the file with the one below, but be sure to change the path to the root file detected.
# See https://redocly.com/docs/cli/configuration/configuration-file/ for information on how to customize your configuration

apis:
  changeme@v1:
    root: ./openapi.yaml

lint:
  extends:
    - recommended
  rules:
    paths-kebab-case: error

features.openapi:
  generateCodeSamples:
    languages:
      - lang: curl
      - lang: Node.js
      - lang: Python

Why should we improve it?

The current one doesn't actually work and requires the user to make a lot of changes.

Describe alternatives you've considered

  • Removing the apis section.

Additional context

The current generated file:

apiDefinitions:
  # a set of named keys and values of entrypoints to OpenAPI definitions.
  # example
  # petstore: ./openapi.yaml

lint:
# the lint options

referenceDocs:
# the API reference docs options, including theme options.
@adamaltman adamaltman changed the title Improve the default redocly.yaml file Improve the default redocly.yaml file Mar 23, 2022
@jeremyfiel
Copy link

@adamaltman will renaming the file only for vscode cause duplicate configs for a user? I use vsc and the cli depending on my workflow. I would prefer to maintain a single file. I have a separate issue opened for allowing config file location in vsc settings because it's currently tied to the workspace only. #16

@adamaltman
Copy link
Member Author

No, it won't cause duplicate configs. It will use either redocly.yaml or .redocly.yaml. If both are present, it will throw an error. We are going to release docs about this by next week. This issue was made in advance. 😄

@adamaltman
Copy link
Member Author

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

No branches or pull requests

2 participants