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

fix: displaying nested items with type string #2634

Merged
merged 2 commits into from
Dec 31, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
chore: improve tests
AlexVarchuk committed Dec 30, 2024

Verified

This commit was signed with the committer’s verified signature.
AlexVarchuk Alex Varchuk
commit 780caf1ef42b9ed94a4ba5e4c79ebc9bfea77fb3
2 changes: 1 addition & 1 deletion src/components/__tests__/FieldDetails.test.tsx
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ describe('FieldDetailsComponent', () => {
items: {
type: 'string',
pattern: '^see regex[0-9]$',
constraints: [''],
constraints: ['<= 128 characters'],
externalDocs: undefined,
},
} as any as SchemaModel,
Original file line number Diff line number Diff line change
@@ -161,13 +161,21 @@ exports[`FieldDetailsComponent renders correctly when field items have string ty
<span
class="sc-kpDqfm sc-dAlyuH sc-dxcDKg cGRfjn gHomYR gXntsr"
>
[
[ items
<span>
<span
class="sc-kpDqfm sc-gFqAkR cGRfjn fYEICH"
>
&lt;= 128 characters
</span>
</span>
<span
class="sc-kpDqfm sc-eDPEul cGRfjn cCKYVD"
>
^see regex[0-9]$
</span>
]
]
</span>
</div>

Unchanged files with check annotations Beta

Redoc is available as a pre-built Docker image in [Docker Hub](https://hub.docker.com/r/redocly/redoc/).
If you have [Docker](https://docs.docker.com/get-docker/) installed, pull the image with the following command:

Check warning on line 10 in docs/deployment/docker.md

GitHub Actions / linkcheck

link checker warning

https://docs.docker.com/get-docker/. Request was redirected to https://docs.docker.com/get-started/get-docker/
```docker
docker pull redocly/redoc
# Redoc vendor extensions
You can use the following [vendor extensions](https://redocly.com/docs/openapi-visual-reference/specification-extensions/) with Redoc.

Check warning on line 3 in docs/redoc-vendor-extensions.md

GitHub Actions / linkcheck

link checker warning

https://redocly.com/docs/openapi-visual-reference/specification-extensions/. 200 - OK
- [Redoc vendor extensions](#redoc-vendor-extensions)
- [Swagger Object](#swagger-object)
Extends the OpenAPI root [OpenAPI Object](https://redocly.com/docs/openapi-visual-reference/openapi)
### x-servers
Backported from OpenAPI 3.0 [`servers`](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#serverObject). Currently doesn't support templates.

Check warning on line 56 in docs/redoc-vendor-extensions.md

GitHub Actions / linkcheck

link checker warning

### x-tagGroups
```
## Tag Object
Extends the OpenAPI [Tag Object](https://redocly.com/docs/openapi-visual-reference/tags/)

Check warning on line 184 in docs/redoc-vendor-extensions.md

GitHub Actions / linkcheck

link checker warning

https://redocly.com/docs/openapi-visual-reference/tags/. 200 - OK
### x-traitTag
| Field Name | Type | Description |
#### Fixed fields
| Field Name | Type | Description |
| :---------- | :------: | :----------- |
| lang | string | Code sample language. Value should be one of the following [list](https://github.com/github/linguist/blob/master/lib/linguist/popular.yml) |

Check warning on line 236 in docs/redoc-vendor-extensions.md

GitHub Actions / linkcheck

link checker warning

| label | string? | Code sample label, for example `Node` or `Python2.7`, _optional_, `lang` is used by default |
| source | string | Code sample source code |
| x-badges | [[Badge Object](https://redocly.com/docs/realm/author/reference/openapi-extensions/x-badges#badge-object)] | A list of badges associated with the operation |
## Parameter Object
Extends the OpenAPI [Parameter Object](https://redocly.com/docs/openapi-visual-reference/parameter/)

Check warning on line 261 in docs/redoc-vendor-extensions.md

GitHub Actions / linkcheck

link checker warning

https://redocly.com/docs/openapi-visual-reference/parameter/. 200 - OK
### x-examples
| Field Name | Type | Description |
| :------------- | :------: | :---------- |
| x-examples | [Example Object](https://redocly.com/docs/openapi-visual-reference/example/) | Object that contains examples for the request. Applies when `in` is `body` and mime-type is `application/json` |

Check warning on line 266 in docs/redoc-vendor-extensions.md

GitHub Actions / linkcheck

link checker warning

https://redocly.com/docs/openapi-visual-reference/example/. 200 - OK
#### How to use with Redoc
`x-examples` are rendered in the JSON tab on the right panel in Redoc.
If specified, you can use `x-summary` as the response button text, with description rendered under the button.
## Schema Object
Extends the OpenAPI [Schema Object](https://redocly.com/docs/openapi-visual-reference/schemas/)

Check warning on line 283 in docs/redoc-vendor-extensions.md

GitHub Actions / linkcheck

link checker warning

https://redocly.com/docs/openapi-visual-reference/schemas/. 200 - OK
### x-nullable
| Field Name | Type | Description |
Open the HTML file in your browser, and your API documentation is shown on the page.
Add your own `spec-url` to the `<redoc>` tag; this attribute can also be a local file. The JavaScript library can also be installed locally using `npm` and served from your own server, see the [HTML deployment documentation](https://redocly.com/docs/redoc/deployment/html/) for more details.

Check warning on line 50 in docs/index.md

GitHub Actions / linkcheck

link checker warning

https://redocly.com/docs/redoc/deployment/html/. 200 - OK
### More usage options
### OpenAPI specification extensions
Redoc uses the following [specification extensions](https://redocly.com/docs/api-reference-docs/spec-extensions/):

Check warning on line 251 in docs/config.md

GitHub Actions / linkcheck

link checker warning

https://redocly.com/docs/api-reference-docs/spec-extensions/. 200 - OK
* [`x-logo`](./redoc-vendor-extensions.md#x-logo) - is used to specify API logo
* [`x-traitTag`](./redoc-vendor-extensions.md#x-traittag) - useful for handling out common things like Pagination, Rate-Limits, etc
* [`x-codeSamples`](./redoc-vendor-extensions.md#x-codesamples) - specify operation code samples