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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: r7kamura/redocly-problem-matchers@v1
- uses: mhiew/redoc-lint-github-action@v3
- uses: mhiew/redoc-lint-github-action@v4
with:
args: '--format stylish'
env:
Expand Down
20 changes: 10 additions & 10 deletions .redocly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ apis:
metric:
root: "./docs/api/metric.yaml"

lint:
extends:
- minimal
rules:
# disable unnecessary/invalid warnings
operation-2xx-response: off # _blipsync 101 Upgrade ...
operation-summary: off # Optional field
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
extends:
- minimal
rules:
# disable unnecessary/invalid warnings
operation-2xx-response: off # _blipsync 101 Upgrade ...
operation-summary: off # Optional field
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)

17 changes: 17 additions & 0 deletions docs/api/README.md
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.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Sync Gateway OpenAPI Specs

This directory contains the OpenAPI specs for the Sync Gateway REST API.

The recommended tool to work with these specs is [Redocly](https://redoc.ly/).

## Preview

```sh
$ redocly preview-docs
```

## Linting

```sh
$ redocly lint
```
Loading