Skip to content

Commit

Permalink
chore(release): publish@4.11.10 (#1570)
Browse files Browse the repository at this point in the history
* jsonSampleExpandLevel optional param

* 4.11.10
  • Loading branch information
melissag-ensemble committed Mar 22, 2024
1 parent e399ce8 commit bea2cb9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,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)
- [jsonSampleExpandLevel (optional)](#jsonsampleexpandlevel-optional)
- [JSDoc](#jsdoc)
- [MDX](#mdx)
- [Modular Content System](#modular-content-system)
Expand Down Expand Up @@ -1176,6 +1177,19 @@ Defaults to ```false```
https://redocly.com/docs/api-reference-docs/configuration/functionality/#theme-object-openapi-schema
#### jsonSampleExpandLevel (optional)
```js
<RedoclyAPIBlock src="URL pointing to your open api yaml file." jsonSampleExpandLevel="all" />
```
Sets the default expand level for JSON payload samples (response and request body). Takes a number >= 1, or the string 'all'.
Defaults to ```2```
https://redocly.com/docs/api-reference-docs/configuration/functionality/#theme-object-openapi-schema
### JSDoc
We currently recommend to use the [JSDoc to markdown](https://github.com/jsdoc2md/jsdoc-to-markdown) converter.
Expand Down
6 changes: 6 additions & 0 deletions packages/gatsby-theme-aio/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.11.10](https://github.com/adobe/aio-theme/compare/@adobe/gatsby-theme-aio@4.11.9...@adobe/gatsby-theme-aio@4.11.10) (2024-03-21)

### Features

* **DEVSITE-1112:** Make expand level of json samples customizable [3f9d02a](https://github.com/adobe/aio-theme/pull/1567/commits/3f9d02a1a82162ee3585679b6dd7f2256ec52bbf)

## [4.11.9](https://github.com/adobe/aio-theme/compare/@adobe/gatsby-theme-aio@4.11.8...@adobe/gatsby-theme-aio@4.11.9) (2024-03-20)

### Features
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-theme-aio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/gatsby-theme-aio",
"version": "4.11.9",
"version": "4.11.10",
"description": "The Adobe I/O theme for building markdown powered sites",
"main": "index.js",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { SIDENAV_WIDTH, MOBILE_SCREEN_WIDTH, isExternalLink } from '../../utils'
import PropTypes from 'prop-types';

const licenseKey = process.env.GATSBY_REDOCLY_KEY;
const all = 'all';

// Redocly API Block that will render the OpenAPI yaml files with Redocly TryIt feature.
const RedoclyAPIBlock = ({
Expand All @@ -25,6 +26,7 @@ const RedoclyAPIBlock = ({
disableSidebar = false,
disableSearch = false,
hideTryItPanel = false,
jsonSampleExpandLevel = 2,
}) => {
const [isRedoclyLoading, setIsRedoclyLoading] = useState(true);

Expand Down Expand Up @@ -64,6 +66,7 @@ const RedoclyAPIBlock = ({
disableSidebar: ${disableSidebar},
disableSearch: ${disableSearch},
hideTryItPanel: ${hideTryItPanel},
jsonSampleExpandLevel: ${jsonSampleExpandLevel === all ? `'${jsonSampleExpandLevel}'` : jsonSampleExpandLevel},
hideLoading: true,
theme: {
${typography ? "typography: { " + typography + "}," : ''}
Expand All @@ -90,6 +93,10 @@ RedoclyAPIBlock.propTypes = {
disableSidebar: PropTypes.bool,
disableSearch: PropTypes.bool,
hideTryItPanel: PropTypes.bool,
jsonSampleExpandLevel: PropTypes.oneOfType([
PropTypes.oneOf([all]),
PropTypes.number,
]),
};

export { RedoclyAPIBlock };

0 comments on commit bea2cb9

Please sign in to comment.