Skip to content

Conversation

@RomanHotsiy
Copy link
Member

@RomanHotsiy RomanHotsiy commented Feb 18, 2025

What/Why/How?

  • Added the generate-arazzo command to scaffold Arazzo specification templates out of OpenAPI descriptions.

  • Added the respect command to test APIs against Arazzo specification files.

Reference

Testing

Screenshots (optional)

Check yourself

  • Code changed? - Tested with redoc/reference-docs/workflows (internal)
  • All new/updated code is covered with tests
  • New package installed? - Tested in different environments (browser/node)

Security

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

@changeset-bot
Copy link

changeset-bot bot commented Feb 18, 2025

🦋 Changeset detected

Latest commit: 8cc5b2e

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

This PR includes changesets to release 3 packages
Name Type
@redocly/respect-core Minor
@redocly/cli Minor
@redocly/openapi-core Minor

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

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@RomanHotsiy RomanHotsiy force-pushed the feat/introduce-respect branch from 58b6609 to d146a22 Compare February 18, 2025 15:56
@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2025

Command Mean [s] Min [s] Max [s] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 1.027 ± 0.009 1.013 1.042 1.08 ± 0.03
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 0.954 ± 0.024 0.930 1.009 1.00

@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2025

Coverage report

❌ An unexpected error occurred. For more details, check console

Error: The process '/opt/hostedtoolcache/node/20.18.2/x64/bin/npm' failed with exit code 1
St.
Category Percentage Covered / Total
🟡 Statements
79.19% (+1.01% 🔼)
6937/8760
🟡 Branches
68.29% (+1.38% 🔼)
2875/4210
🟡 Functions
74.97% (+1.98% 🔼)
1141/1522
🟡 Lines
79.56% (+1.16% 🔼)
6612/8311
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / runner.ts
88.79% 79.59% 90% 89.52%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / create-har-log.ts
100% 100% 100% 100%
🟢
... / add-headers.ts
100% 100% 100% 100%
🟢
... / get-duration.ts
100% 100% 100% 100%
🟢
... / build-request-cookies.ts
100% 100% 100% 100%
🟢
... / build-headers.ts
100% 100% 100% 100%
🟢
... / build-response-cookies.ts
95% 100% 100% 95%
🟡
... / api-fetcher.ts
70.27% 55.56% 62.5% 70.91%
🟢
... / is-empty.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / get-value-from-context.ts
86.36% 73.33% 95% 89.32%
🟢
... / logger.ts
100% 80% 100% 100%
🟢
... / parse-parameters.ts
100% 100% 100% 100%
🟢
... / parse-request-body.ts
100% 96% 100% 100%
🟢
... / handle-request-body-replacements.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / evaluate.ts
98.75% 97.06% 100% 98.72%
🟢
... / lint.ts
100% 100% 100% 100%
🟢
... / replace-json-pointers.ts
100% 100% 100% 100%
🟢
... / resolve-reusable-object-reference.ts
100% 100% 100% 100%
🟢
... / resolve-reusable-component.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🔴
... / display-summary.ts
40% 0% 0% 40%
🟢
... / time.ts
100% 100% 100% 100%
🟢
... / calculate-tests-passed.ts
80% 50% 100% 80%
🟢
... / cli-outputs.ts
100% 85.71% 100% 100%
🔴
... / display-errors.ts
15% 0% 0% 17.14%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / checks.ts
100% 100% 100% 100%
🟢
... / severity.ts
100% 100% 100% 100%
🟢
... / display-checks.ts
91.49% 54.17% 71.43% 91.3%
🟢
... / url.ts
100% 100% 100% 100%
🟢
... / is-json.ts
100% 100% 100% 100%
🔴
... / display-files-summary-table.ts
18.42% 0% 0% 20%
🟢
... / verbose-logs.ts
100% 100% 100% 100%
🟢
... / mask-secrets.ts
81.82% 62.5% 57.14% 90%
🔴
... / json-logs.ts
9.38% 0% 0% 9.68%
🟢
... / index.ts
100% 100% 100% 100%
🟡
... / bundle-openapi.ts
76.19% 62.5% 100% 75%
🟢
... / is-url.ts
100% 100% 100% 100%
🟡
... / get-request-data-from-openapi.ts
67.86% 68.18% 66.67% 67.86%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / generate-arazzo-description.ts
96.3% 77.78% 80% 96.3%
🟢
... / sort.ts
100% 100% 100% 100%
🟢
... / cleanup-test-description.ts
100% 100% 100% 100%
🟢
... / generate-test-data-from-json-schema.ts
100% 100% 100% 100%
🟢
... / generate-example-value.ts
100% 100% 100% 100%
🟢
... / extract-first-example.ts
100% 66.67% 100% 100%
🟢
... / get-operation-from-description.ts
92.86% 85.71% 100% 92.86%
🟢
... / get-operation-by-id.ts
88.46% 75% 100% 88.46%
🟢
... / get-operation-by-path.ts
95.83% 82.35% 100% 95.83%
🟢
... / remove-write-only-properties.ts
100% 100% 100% 100%
🟢
... / get-response-schema.ts
100% 100% 100% 100%
🟢
... / get-request-body-schema.ts
100% 100% 100% 100%
🟢
... / create-mtls-client.ts
100% 100% 100% 100%
🟢
... / create-test-context.ts
100% 77.78% 100% 100%
🟢
... / faker.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / format-cli-inputs.ts
100% 100% 100% 100%
🟢
... / map-input-values-to-schema.ts
100% 100% 100% 100%
🟢
... / get-test-description-from-file.ts
100% 83.33% 100% 100%
🟢
... / file.ts
100% 100% 100% 100%
🟢
... / yaml.ts
100% 100% 100% 100%
🟢
... / read-env-variables.ts
100% 100% 100% 100%
🟢
... / get-nested-value.ts
100% 100% 100% 100%
🟢
... / set-public-workflows.ts
100% 72.73% 100% 100%
🟢
... / set-public-steps.ts
100% 100% 100% 100%
🟢
... / resolve-mtls-certificates.ts
100% 75% 100% 100%
🟢
... / get-workflows-to-run.ts
100% 100% 100% 100%
🟢
... / run-step.ts
92.54% 88.75% 100% 92.31%
🟢
... / call-api-and-analyze-results.ts
81.82% 66.67% 66.67% 83.87%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / validate-success-criteria.ts
100% 100% 100% 100%
🟢
... / check-success-criteria.ts
100% 91.67% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / create-runtime-expression-ctx.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / schema-checker.ts
97.83% 76.67% 100% 97.83%
🟢
... / ajv-errors.ts
100% 80% 100% 100%
🟢
... / check-circular-refs-in-schema.ts
100% 100% 100% 100%
🟢
... / prepare-request.ts
90.79% 83.58% 100% 90.54%
🟢
... / get-server-url.ts
97.5% 93.33% 100% 97.44%
🟢
... / resolve-running-workflows.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / print-message.ts
100% 100% 100% 100%
🟢
... / error-message-matcher.ts
100% 100% 100% 100%
🟢
... / respect-supported-versions.ts
100% 100% 100% 100%
🟢
... / no-criteria-xpath.ts
100% 100% 100% 100%
🟢
... / clean-colors.ts
100% 100% 100% 100%
🟢
... / handle-request.ts
77.19% 68% 73.33% 80%
🟡
... / get-agent.ts
75.56% 88.89% 60% 75.56%
🟢
... / get-input-url.ts
100% 100% 100% 100%
🟢
... / build-params.ts
100% 100% 100% 100%
🟡
... / env.ts
75% 42.86% 50% 75%
🔴
... / index.ts
0% 100% 0% 0%
🔴
... / arazzo-schema.ts
0% 100% 100% 0%
🔴
... / generate.ts
0% 0% 0% 0%
🔴
... / index.ts
0% 100% 100% 0%
🔴
... / exit-with-error.ts
0% 100% 0% 0%
🔴
... / run.ts
0% 0% 0% 0%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / miscellaneous.ts
67.19% (-1.17% 🔻)
54.69%
69.64% (-2.58% 🔻)
66.93% (-1.2% 🔻)
🔴 cli/src/otel.ts
0% (-61.9% 🔻)
0% (-66.67% 🔻)
0% (-50% 🔻)
0% (-61.9% 🔻)

Test suite run failed

Failed tests: 1/1330. Failed suites: 1/191.
  ● no-invalid-media-type-examples › should not report if value is valid and externalValue is also set

    thrown: "Exceeded timeout of 10000 ms for a test.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      570 |   });
      571 |
    > 572 |   it('should not report if value is valid and externalValue is also set', async () => {
          |   ^
      573 |     const document = parseYamlToDocument(
      574 |       outdent`
      575 |         openapi: 3.0.0

      at packages/core/src/rules/oas3/__tests__/no-invalid-media-type-examples.test.ts:572:3
      at Object.<anonymous> (packages/core/src/rules/oas3/__tests__/no-invalid-media-type-examples.test.ts:8:1)

Report generated by 🧪jest coverage report action from 8cc5b2e

@RomanHotsiy RomanHotsiy changed the title feat: WIP, introduce "respect" feat: wip, introduce "respect" Feb 18, 2025
@tatomyr tatomyr added the snapshot Create experimental release PR label Feb 18, 2025
@tatomyr tatomyr added snapshot Create experimental release PR and removed snapshot Create experimental release PR labels Feb 18, 2025
@tatomyr tatomyr added snapshot Create experimental release PR and removed snapshot Create experimental release PR labels Feb 18, 2025
@tatomyr tatomyr added snapshot Create experimental release PR and removed snapshot Create experimental release PR labels Feb 18, 2025
@tatomyr tatomyr added snapshot Create experimental release PR and removed snapshot Create experimental release PR labels Feb 18, 2025
@tatomyr tatomyr added snapshot Create experimental release PR and removed snapshot Create experimental release PR labels Feb 18, 2025
@DmitryAnansky DmitryAnansky added snapshot Create experimental release PR and removed snapshot Create experimental release PR labels Feb 19, 2025
@DmitryAnansky DmitryAnansky removed the snapshot Create experimental release PR label Feb 25, 2025
@DmitryAnansky DmitryAnansky self-requested a review February 25, 2025 12:51
@DmitryAnansky DmitryAnansky added the snapshot Create experimental release PR label Feb 25, 2025
@RomanHotsiy RomanHotsiy changed the title feat: wip, introduce "respect" feat: introduce "respect" Feb 25, 2025
@RomanHotsiy RomanHotsiy marked this pull request as ready for review February 25, 2025 13:42
@RomanHotsiy RomanHotsiy requested review from a team as code owners February 25, 2025 13:42
@RomanHotsiy
Copy link
Member Author

🚢

@DmitryAnansky DmitryAnansky merged commit e17d0f6 into main Feb 25, 2025
41 of 42 checks passed
@DmitryAnansky DmitryAnansky deleted the feat/introduce-respect branch February 25, 2025 14:06
@RomanHotsiy
Copy link
Member Author

🎉 🔥

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

Labels

deploy_s3_sandbox snapshot Create experimental release PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants