Skip to content

Commit

Permalink
refactor: rename to API description for consistency (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamaltman committed Sep 18, 2023
1 parent 680c431 commit 0a73f1f
Show file tree
Hide file tree
Showing 129 changed files with 273 additions and 282 deletions.
6 changes: 6 additions & 0 deletions .changeset/three-moose-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@redocly/openapi-core': patch
'@redocly/cli': patch
---

Renamed API definition to API description for consistency.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ E2E tests are sensitive to any additional output (like `console.log`) in the sou
- **`packages/core/src/types`**: contains the common types for several OpenAPI versions.
- **`packages/core/src/typings`**: contains the common Typescript typings.

- **`resources`**: contains some example API definitions and configuration files that might be useful for testing.
- **`resources`**: contains some example API descriptions and configuration files that might be useful for testing.

## Release flow

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ Steps to reproduce the behavior:

<!-- If applicable, add logs to help explain your problem. -->

**OpenAPI definition**
**OpenAPI description**

<!-- If applicable, add an OpenAPI definition and `.redocly.yaml` configuration file that helps reproduce the problem.
<!-- If applicable, add an OpenAPI description and `.redocly.yaml` configuration file that helps reproduce the problem.
At a minimum, please state the specification version(s) you're using (e.g. 2.0, 3.0, 3.1). -->

**Redocly Version(s)**
Expand Down
1 change: 1 addition & 0 deletions .github/styles/Vocab/Rules/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ OpenTracing
Operator
OperatorHub
OpenAPI
AsyncAPI
osd
PHP
PostgreSQL
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ redocly lint path-to-root-file.yaml

### Docker

To give the Docker container access to the OpenAPI definition files, you need to
mount the containing directory as a volume. Assuming the OAS definition is rooted
To give the Docker container access to the OpenAPI description files, you need to
mount the containing directory as a volume. Assuming the API description is rooted
in the current working directory, you need the following command:

```
Expand Down Expand Up @@ -93,7 +93,7 @@ This tool [collects data](./docs/usage-data.md) to help Redocly improve our prod

## Credits

Thanks to [graphql-js](https://github.com/graphql/graphql-js) and [eslint](https://github.com/eslint/eslint) for inspiration of the definition traversal approach and to [Swagger](https://github.com/swagger-api/swagger-editor), [Spectral](https://github.com/stoplightio/spectral), and [OAS-Kit](https://github.com/Mermade/oas-kit) for inspiring the recommended ruleset.
Thanks to [graphql-js](https://github.com/graphql/graphql-js) and [eslint](https://github.com/eslint/eslint) for inspiration of the API description traversal approach and to [Swagger](https://github.com/swagger-api/swagger-editor), [Spectral](https://github.com/stoplightio/spectral), and [OAS-Kit](https://github.com/Mermade/oas-kit) for inspiring the recommended ruleset.

## Development

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Error was generated by the configuration spec rule.
validating ../__fixtures__/valid-openapi.yaml...
../__fixtures__/valid-openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
[WARNING] Unused rules found in .redocly.yaml: context.
Check the spelling and verify the added plugin prefix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint-config test with option: { dirName: 'invalid-config--lint-conf
validating ../__fixtures__/valid-openapi.yaml...
../__fixtures__/valid-openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
[WARNING] Unused rules found in .redocly.yaml: context.
Check the spelling and verify the added plugin prefix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You have 1 warning.
validating ../__fixtures__/valid-openapi.yaml...
../__fixtures__/valid-openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
[WARNING] Unused rules found in .redocly.yaml: context.
Check the spelling and verify the added plugin prefix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You have 1 warning.
validating ../__fixtures__/valid-openapi.yaml...
../__fixtures__/valid-openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
[WARNING] Unused rules found in .redocly.yaml: context.
Check the spelling and verify the added plugin prefix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The 'assert/' syntax in assert/path-item-mutually-required is deprecated. Update
validating ../__fixtures__/valid-openapi.yaml...
../__fixtures__/valid-openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Error was generated by the configuration spec rule.
validating ../__fixtures__/valid-openapi.yaml...
../__fixtures__/valid-openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
[WARNING] Unused rules found in .redocly.yaml: asset/path-item-mutually-required.
Check the spelling and verify the added plugin prefix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`E2E lint-config test with option: {
validating ../__fixtures__/valid-openapi.yaml...
../__fixtures__/valid-openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/assertions-camel-case-twice/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Warning was generated by the rule/named-parameters-camelCase rule.
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
You have 2 warnings.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lint/assertions-non-empty-off/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint assertions-non-empty-off 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/assertions-non-empty-warn/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Warning was generated by the rule/summary-non-empty rule.
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
You have 1 warning.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint assertions-type-integer-in-schema-response 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/assertions/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint assertions 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/async2/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ validating /streetlights-operation-security.yml...
validating /websocket-gemini.yml...
/websocket-gemini.yml: validated in <test>ms
Woohoo! Your OpenAPI definitions are valid. 🎉
Woohoo! Your API descriptions are valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/deprecated-apiDefinitions/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Warning was generated by the info-contact rule.
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
You have 1 warning.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lint/info-contact--lint-in-apis/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint info-contact--lint-in-apis 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Warning was generated by the info-contact rule.
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
You have 1 warning.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lint/info-contact/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint info-contact 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Warning was generated by the info-license rule.
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
You have 1 warning.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lint/info-license-rule/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint info-license-rule 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Warning was generated by the info-license-url rule.
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
You have 1 warning.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lint/info-license-url-rule/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint info-license-url-rule 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/merge-lint-configs/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Warning was generated by the info-contact rule.
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
You have 1 warning.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lint/no-empty-servers-rule/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint no-empty-servers-rule 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/no-empty-servers-warning/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Warning was generated by the no-empty-servers rule.
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
You have 1 warning.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lint/no-enum-type-mismatch/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint no-enum-type-mismatch 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint no-invalid-media-type-examples-recursion-oneOf 1`] = `
validating /openapi.json...
/openapi.json: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Warning was generated by the no-invalid-media-type-examples rule.
/openapi.json: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
You have 2 warnings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint no-invalid-schema-examples-oas3.1 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/no-invalid-schema-examples/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint no-invalid-schema-examples 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/no-path-trailing-slash-off/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint no-path-trailing-slash-off 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/no-path-trailing-slash-rule/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint no-path-trailing-slash-rule 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/no-server-example-rule/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint no-server-example-rule 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/no-server-trailing-slash-rule/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint no-server-trailing-slash-rule 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/no-server-variables-empty-enum/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint no-server-variables-empty-enum 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/no-unresolved-refs-rule/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint no-unresolved-refs-rule 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/no-unused-components-rule/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint no-unused-components-rule 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
2 changes: 1 addition & 1 deletion __tests__/lint/no-unused-components-warning/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Warning was generated by the no-unused-components rule.
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
You have 1 warning.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lint/oas2/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`E2E lint oas2 1`] = `
validating /openapi.yaml...
/openapi.yaml: validated in <test>ms
Woohoo! Your OpenAPI definition is valid. 🎉
Woohoo! Your API description is valid. 🎉
`;
Loading

1 comment on commit 0a73f1f

@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 75.88% 3995/5265
🟡 Branches 65.8% 2128/3234
🟡 Functions 68% 648/953
🟡 Lines 76.07% 3745/4923

Test suite run success

635 tests passing in 93 suites.

Report generated by 🧪jest coverage report action from 0a73f1f

Please sign in to comment.