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

OpenAPI: Update redocly cli in GH Actions and fix deprecated lint section #6690

Merged
merged 3 commits into from
Feb 16, 2024

Conversation

bbrks
Copy link
Member

@bbrks bbrks commented Feb 16, 2024

Attempt 2 now the GitHub action has been updated to pull the latest version of redocly cli.

Brings GH Action and config up to date with locally run redocly command.

Fix deprecated lint config.

Fixes:

[1] .redocly.yaml:21:1 at #/lint

Property `lint` is not expected here.

Did you mean: env ?

19 |     root: "./docs/api/diagnostic.yaml"
20 |
21 | lint:
22 |   extends:
23 |     - minimal

Warning was generated by the configuration spec rule.


⚠️ Your config has 1 warning.
The 'lint' field is deprecated. Read more about this change: https://redocly.com/docs/api-registry/guides/migration-guide-config-file/#changed-properties

Disable security-defined linter

Until we document what endpoints are public, this avoids the following lint warnings on all endpoints:

[4] docs/api/paths/admin/db-_session-sessionid.yaml:11:1 at #/get

Every operation should have security defined on it or on the root level.

 9 |   - $ref: ../../components/parameters.yaml#/db
10 |   - $ref: ../../components/parameters.yaml#/sessionid
11 | get:
12 |   summary: Get session information
13 |   description: |-

Warning was generated by the security-defined rule.

Integration Tests

  • n/a

Copy link

Redocly previews

Copy link
Member Author

Choose a reason for hiding this comment

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

I plan on adding more to this at another time.

E.g. Describing intention/users of these specs, ref structure, noting x-internal once in place, etc.

no-ambiguous-paths: off # /{db}/{doc} != /_debug/expvar
no-identical-paths: off # /{db} != /{targetdb}
no-path-trailing-slash: off # Some endpoints require a trailing slash
security-defined: off # TODO: Denote public and authenticated API endpoints with https://redocly.com/docs/cli/rules/security-defined
Copy link
Member Author

@bbrks bbrks Feb 16, 2024

Choose a reason for hiding this comment

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

I've filed a ticket for this task (CBG-3789).

I think we should do it (only a few of our endpoints are "public" and require no auth)

@bbrks bbrks changed the title OpenAPI: Update redocly.yaml config to remove deprecated lint section OpenAPI: Update redocly cli in GH Actions and fix deprecated lint section Feb 16, 2024
@bbrks bbrks merged commit 16d46c8 into master Feb 16, 2024
35 checks passed
@bbrks bbrks deleted the CBG-3779 branch February 16, 2024 17:03
bbrks added a commit that referenced this pull request Mar 28, 2024
…ection (#6690)

* * Remove deprecated `lint` config.

* Disable `security-defined` linter until we document what is public

* Add OpenAPI spec readme - will populate with more info another time

* Bump action version
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