Skip to content

Commit

Permalink
feat: sortOperationsAlphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
melissag-ensemble committed Aug 15, 2024
1 parent fced957 commit 24d431e
Show file tree
Hide file tree
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
Expand Up @@ -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)
- [sortOperationsAlphabetically (optional)](#sortoperationsalphabetically-optional)
- [sortTagsAlphabetically (optional)](#sorttagsalphabetically-optional)
- [jsonSampleExpandLevel (optional)](#jsonsampleexpandlevel-optional)
- [generateCodeSamples (optional)](#generatecodesamples-optional)
Expand Down Expand Up @@ -1198,6 +1199,18 @@ Defaults to ```false```
https://redocly.com/docs/api-reference-docs/configuration/functionality/#theme-object-openapi-schema
#### sortOperationsAlphabetically (optional)
```js
<RedoclyAPIBlock src="URL pointing to your open api yaml file." sortOperationsAlphabetically />
```
When set to `true`, sorts operations in the navigation sidebar and in the middle panel alphabetically.˙
Defaults to ```false```
https://redocly.com/docs/api-reference-docs/configuration/functionality/#theme-object-openapi-schema
#### sortTagsAlphabetically (optional)
```js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const RedoclyAPIBlock = ({
disableSidebar = false,
disableSearch = false,
hideTryItPanel = false,
sortOperationsAlphabetically = false,
sortTagsAlphabetically = false,
jsonSampleExpandLevel = 2,
generateCodeSamples = 'languages: [], skipOptionalParameters: false,',
Expand Down Expand Up @@ -69,6 +70,7 @@ const RedoclyAPIBlock = ({
disableSidebar: ${disableSidebar},
disableSearch: ${disableSearch},
hideTryItPanel: ${hideTryItPanel},
sortOperationsAlphabetically: ${sortOperationsAlphabetically},
sortTagsAlphabetically: ${sortTagsAlphabetically},
jsonSampleExpandLevel: ${jsonSampleExpandLevel === all ? `'${jsonSampleExpandLevel}'` : jsonSampleExpandLevel},
${generateCodeSamples ? "generateCodeSamples: { " + generateCodeSamples + "}," : ''}
Expand Down Expand Up @@ -99,6 +101,7 @@ RedoclyAPIBlock.propTypes = {
disableSidebar: PropTypes.bool,
disableSearch: PropTypes.bool,
hideTryItPanel: PropTypes.bool,
sortOperationsAlphabetically: PropTypes.bool,
sortTagsAlphabetically: PropTypes.bool,
jsonSampleExpandLevel: PropTypes.oneOfType([
PropTypes.oneOf([all]),
Expand Down

0 comments on commit 24d431e

Please sign in to comment.