Skip to content

Commit

Permalink
fix: add type tree for metadata-schema rule (#1504)
Browse files Browse the repository at this point in the history
  • Loading branch information
tatomyr committed Mar 26, 2024
1 parent 652a4b2 commit 7ed4dd6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/metal-countries-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@redocly/openapi-core": patch
---

Added a type tree for the `metadata-schema` rule.
7 changes: 7 additions & 0 deletions packages/core/src/types/redocly-yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,12 @@ const ObjectRule: NodeType = {
required: ['severity'],
};

// TODO: add better type tree for this
const Schema: NodeType = {
properties: {},
additionalProperties: {},
};

const AssertionDefinitionSubject: NodeType = {
properties: {
type: {
Expand Down Expand Up @@ -1120,6 +1126,7 @@ const CoreConfigTypes: Record<string, NodeType> = {
ButtonOverrides,
Overrides,
ObjectRule,
Schema,
RightPanel,
Rules,
Shape,
Expand Down

1 comment on commit 7ed4dd6

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 76.65% 4395/5734
🟡 Branches 66.72% 2360/3537
🟡 Functions 70.1% 722/1030
🟡 Lines 76.82% 4126/5371

Test suite run success

716 tests passing in 101 suites.

Report generated by 🧪jest coverage report action from 7ed4dd6

Please sign in to comment.