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

fix: update redocly.yaml validation #1259

Merged
merged 3 commits into from
Sep 14, 2023
Merged

Conversation

tatomyr
Copy link
Contributor

@tatomyr tatomyr commented Sep 13, 2023

What/Why/How?

Redocly config validation update.
Copied and pasted validation schemas from the Portal, and added additional 'rules' validation (metadata-schema and custom-fields-schema).

Reference

Testing

Tested on Portal playground's and Rebilly redocly.yaml files.

Screenshots (optional)

Check yourself

  • Code is linted
  • Tested with redoc/reference-docs/workflows (internal)
  • All new/updated code is covered with tests

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

@tatomyr tatomyr self-assigned this Sep 13, 2023
@tatomyr tatomyr requested a review from a team as a code owner September 13, 2023 17:16
@changeset-bot
Copy link

changeset-bot bot commented Sep 13, 2023

🦋 Changeset detected

Latest commit: 26c4e6b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@redocly/openapi-core Patch
@redocly/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tatomyr tatomyr requested review from RomanHotsiy, vital4u4ok and a team September 13, 2023 17:17
@github-actions
Copy link
Contributor

github-actions bot commented Sep 13, 2023

Command Mean [s] Min [s] Max [s] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 1.365 ± 0.030 1.333 1.436 1.00
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 1.389 ± 0.026 1.359 1.430 1.02 ± 0.03

@github-actions
Copy link
Contributor

github-actions bot commented Sep 13, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 75.44% 3793/5028
🟡 Branches 66.3% 2103/3172
🟡 Functions 68.6% 638/930
🟡 Lines 75.59% 3543/4687
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / portal-config-schema.ts
100% 100% 100% 100%
🟢
... / theme-config.ts
100% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / redocly-yaml.ts
79.28% (-1.09% 🔻)
34.38% (-4.91% 🔻)
55.56%
79.09% (-1.1% 🔻)

Test suite run success

625 tests passing in 91 suites.

Report generated by 🧪jest coverage report action from 26c4e6b

@tatomyr tatomyr force-pushed the fix/update-redocly-yaml-validation branch from c5744f6 to 26c4e6b Compare September 13, 2023 17:29
@lornajane
Copy link
Contributor

Are we asking docs in this pull request, or capturing in an issue what we need to add later? Link the issue if its separate

@tatomyr
Copy link
Contributor Author

tatomyr commented Sep 14, 2023

@lornajane I don't think there's something to be documented here. We are only catching up with the Portal config, no changes to the CLI config itself.

Copy link
Contributor

@SmoliyY SmoliyY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also will be great to see some e2e test for validation of config.
At least for cases with metadata-schema and custom-fields-schema

@lornajane
Copy link
Contributor

Got it. I thought we were also adopting the rules and would need docs. Now I see it's just the validation

@tatomyr
Copy link
Contributor Author

tatomyr commented Sep 14, 2023

@SmoliyY I see your point, but those don't make sense in the CLI itself as they are not quite rules and are only related to the Portal.

@tatomyr tatomyr merged commit 0ea1b59 into main Sep 14, 2023
@tatomyr tatomyr deleted the fix/update-redocly-yaml-validation branch September 14, 2023 08:38
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.

6 participants