diff --git a/content/api/introduction.md b/content/reference/introduction.md similarity index 100% rename from content/api/introduction.md rename to content/reference/introduction.md diff --git a/data/sections.yml b/data/sections.yml index 26e270d6..2cb4e55d 100644 --- a/data/sections.yml +++ b/data/sections.yml @@ -13,7 +13,7 @@ link: /tutorials/introduction/ color: orange -- title: API References - description: Get the API references for all relevant components. - link: /api/introduction/ +- title: API & Library References + description: Get the references for REST APIs and library methods for all relevant components. + link: /reference/introduction/ color: green diff --git a/data/sidebars/api.yml b/data/sidebars/reference.yml similarity index 69% rename from data/sidebars/api.yml rename to data/sidebars/reference.yml index 119c5d09..4cdd32e8 100644 --- a/data/sidebars/api.yml +++ b/data/sidebars/reference.yml @@ -1,7 +1,7 @@ - group: Overview items: - title: API References - link: /api/introduction/ + link: /reference/introduction/ # - group: squid-js # items: @@ -11,14 +11,14 @@ - group: aquarius items: - title: API reference - link: /api/aquarius/ + link: /reference/aquarius/ - group: brizo items: - title: API reference - link: /api/brizo/ + link: /reference/brizo/ - group: pet store items: - title: API reference - link: /api/petstore/ + link: /reference/petstore/ diff --git a/gatsby-node.js b/gatsby-node.js index a8def835..4f04616b 100755 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -155,7 +155,7 @@ exports.createPages = ({ graphql, actions }) => { './src/templates/ApiSwagger.jsx' ) - const petStoreSlug = '/api/petstore/' + const petStoreSlug = '/reference/petstore/' try { const spec = await getSpec() @@ -173,7 +173,7 @@ exports.createPages = ({ graphql, actions }) => { } const aquariusSpecs = require('./data/aquarius.json') - const aquariusSlug = '/api/aquarius/' + const aquariusSlug = '/reference/aquarius/' createPage({ path: aquariusSlug, @@ -185,7 +185,7 @@ exports.createPages = ({ graphql, actions }) => { }) const brizoSpecs = require('./data/brizo.json') - const brizoSlug = '/api/brizo/' + const brizoSlug = '/reference/brizo/' createPage({ path: brizoSlug, diff --git a/src/templates/ApiSwagger.jsx b/src/templates/ApiSwagger.jsx index f1ab7026..13694b67 100644 --- a/src/templates/ApiSwagger.jsx +++ b/src/templates/ApiSwagger.jsx @@ -50,8 +50,8 @@ const Method = ({ keyName, value }) => ( ) Method.propTypes = { - keyName: PropTypes.string, - value: PropTypes.object + keyName: PropTypes.string.isRequired, + value: PropTypes.object.isRequired } export default class ApiSwaggerTemplate extends Component { @@ -78,7 +78,7 @@ export default class ApiSwaggerTemplate extends Component { return ( <> - + @@ -83,7 +83,7 @@ export default class DocTemplate extends Component { toc={ isApiSection && !location.pathname.includes( - '/api/introduction/' + '/reference/introduction/' ) } tableOfContents={tableOfContents}