Skip to content

Commit

Permalink
feat: sortTagsAlphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
melissag-ensemble committed Aug 15, 2024
1 parent 46c3b8b commit fced957
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -107,6 +107,7 @@ Using a theme, all of your default configuration lives in an npm package.
- [disableSidebar (optional)](#disablesidebar-optional)
- [disableSearch (optional)](#disablesearch-optional)
- [hideTryItPanel (optional)](#hidetryitpanel-optional)
- [sortTagsAlphabetically (optional)](#sorttagsalphabetically-optional)
- [jsonSampleExpandLevel (optional)](#jsonsampleexpandlevel-optional)
- [generateCodeSamples (optional)](#generatecodesamples-optional)
- [requestInterceptor (optional)](#requestinterceptor-optional)
@@ -1197,6 +1198,18 @@ Defaults to ```false```
https://redocly.com/docs/api-reference-docs/configuration/functionality/#theme-object-openapi-schema
#### sortTagsAlphabetically (optional)
```js
<RedoclyAPIBlock src="URL pointing to your open api yaml file." sortTagsAlphabetically />
```
When set to `true`, sorts tags in the navigation sidebar and in the middle panel alphabetically. Note that only tags will be sorted alphabetically in the middle panel, not the operations associated with each tag. To sort operations alphabetically as well, you must set `sortOperationsAlphabetically` to `true`.
Defaults to ```false```
https://redocly.com/docs/api-reference-docs/configuration/functionality/#theme-object-openapi-schema
#### jsonSampleExpandLevel (optional)
```js
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ const RedoclyAPIBlock = ({
disableSidebar = false,
disableSearch = false,
hideTryItPanel = false,
sortTagsAlphabetically = false,
jsonSampleExpandLevel = 2,
generateCodeSamples = 'languages: [], skipOptionalParameters: false,',
requestInterceptor = '',
@@ -68,6 +69,7 @@ const RedoclyAPIBlock = ({
disableSidebar: ${disableSidebar},
disableSearch: ${disableSearch},
hideTryItPanel: ${hideTryItPanel},
sortTagsAlphabetically: ${sortTagsAlphabetically},
jsonSampleExpandLevel: ${jsonSampleExpandLevel === all ? `'${jsonSampleExpandLevel}'` : jsonSampleExpandLevel},
${generateCodeSamples ? "generateCodeSamples: { " + generateCodeSamples + "}," : ''}
${requestInterceptor ? "requestInterceptor: " + requestInterceptor + "," : ''}
@@ -97,6 +99,7 @@ RedoclyAPIBlock.propTypes = {
disableSidebar: PropTypes.bool,
disableSearch: PropTypes.bool,
hideTryItPanel: PropTypes.bool,
sortTagsAlphabetically: PropTypes.bool,
jsonSampleExpandLevel: PropTypes.oneOfType([
PropTypes.oneOf([all]),
PropTypes.number,

0 comments on commit fced957

Please sign in to comment.