Skip to content

Conversation

@alxndrsn
Copy link
Contributor

@alxndrsn alxndrsn commented Oct 25, 2025

Per discussion on #1633, it looks like redocly config will need to be updated for better compatibility in the future.

This PR extract the current minimal redocly config from source (https://github.com/Redocly/redocly-cli/blob/2367722a9fb173e55626dccbdac7b6694dd8b199/packages/core/src/config/minimal.ts#L52-L112) into a config file.

This should simplify tracking of future changes to this config.

Similarity to existing config can be confirmed with:

$ diff <(npx --no @redocly/cli lint --extends=minimal docs/api.yaml 2>&1) <(npx --no @redocly/cli lint --config docs/redocly.conf.yaml docs/api.yaml 2>&1)
1,2d0
< No configurations were provided -- using built in recommended configuration by default.
<
1447c1445
< docs/api.yaml: validated in 451ms
---
> docs/api.yaml: validated in 415ms

What has been done to verify that this works as intended?

diff <(npx --no @redocly/cli lint --extends=minimal docs/api.yaml 2>&1) <(npx --no @redocly/cli lint --config docs/redocly.conf.yaml docs/api.yaml 2>&1)

Why is this the best possible solution? Were any other approaches considered?

There isn't an alternative.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Should help improve future support for parsing docs/api.yaml for users' OpenAPI clients.

Does this change require updates to the API documentation? If so, please update docs/api.yaml as part of this PR.

No.

Before submitting this PR, please make sure you have:

  • run make test and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code from external sources are properly credited in comments or that everything is internally sourced

alxndrsn added 3 commits October 25, 2025 10:27
Per discussion on getodk#1633, it looks like redocly config needs to be more explicit.

This PR extract the current `minimal` redocly config from source (https://github.com/Redocly/redocly-cli/blob/2367722a9fb173e55626dccbdac7b6694dd8b199/packages/core/src/config/minimal.ts#L52-L112) into a config file.  This should simplify tracking of future changes to this config.

Similarity to existing config can be confirmed with:

```sh
$ diff <(npx --no @redocly/cli lint --extends=minimal docs/api.yaml 2>&1) <(npx --no @redocly/cli lint --config docs/redocly.conf.yaml docs/api.yaml 2>&1)
1,2d0
< No configurations were provided -- using built in recommended configuration by default.
<
1447c1445
< docs/api.yaml: validated in 451ms
---
> docs/api.yaml: validated in 415ms
```
@alxndrsn alxndrsn marked this pull request as ready for review October 25, 2025 10:43
@alxndrsn alxndrsn requested a review from sadiqkhoja October 30, 2025 18:00
@alxndrsn alxndrsn merged commit 570a693 into getodk:master Oct 31, 2025
7 checks passed
@alxndrsn alxndrsn deleted the redocly-config-file branch October 31, 2025 13:27
alxndrsn pushed a commit to alxndrsn/odk-central-backend that referenced this pull request Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants