Docs: update api reference (#1213)
* Updated API reference * fixed error for requests with no response
This commit is contained in:
@@ -63,6 +63,10 @@
|
|||||||
{
|
{
|
||||||
"name": "Product Variant",
|
"name": "Product Variant",
|
||||||
"x-resourceId": "product_variant"
|
"x-resourceId": "product_variant"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "OAuth",
|
||||||
|
"x-resourceId": "OAuth"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"servers": [
|
"servers": [
|
||||||
|
|||||||
+2649
-480
File diff suppressed because it is too large
Load Diff
+1246
-657
File diff suppressed because it is too large
Load Diff
+1070
-633
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,17 @@
|
|||||||
|
import { Box, Flex, Heading, Text } from "theme-ui"
|
||||||
import React, { useContext, useEffect, useRef } from "react"
|
import React, { useContext, useEffect, useRef } from "react"
|
||||||
import Markdown from "react-markdown"
|
|
||||||
import { Flex, Text, Box, Heading } from "theme-ui"
|
|
||||||
import { convertToKebabCase } from "../../utils/convert-to-kebab-case"
|
|
||||||
import Parameters from "./parameters"
|
|
||||||
import Route from "./route"
|
|
||||||
import JsonContainer from "./json-container"
|
|
||||||
import Description from "./description"
|
import Description from "./description"
|
||||||
import ResponsiveContainer from "./responsive-container"
|
import JsonContainer from "./json-container"
|
||||||
import { formatMethodParams } from "../../utils/format-parameters"
|
import Markdown from "react-markdown"
|
||||||
import useInView from "../../hooks/use-in-view"
|
|
||||||
import NavigationContext from "../../context/navigation-context"
|
import NavigationContext from "../../context/navigation-context"
|
||||||
|
import Parameters from "./parameters"
|
||||||
|
import ResponsiveContainer from "./responsive-container"
|
||||||
|
import Route from "./route"
|
||||||
|
import { convertToKebabCase } from "../../utils/convert-to-kebab-case"
|
||||||
|
import { formatMethodParams } from "../../utils/format-parameters"
|
||||||
import { formatRoute } from "../../utils/format-route"
|
import { formatRoute } from "../../utils/format-route"
|
||||||
|
import useInView from "../../hooks/use-in-view"
|
||||||
|
|
||||||
const Method = ({ data, section, pathname, api }) => {
|
const Method = ({ data, section, pathname, api }) => {
|
||||||
const { parameters, requestBody, description, method, summary } = data
|
const { parameters, requestBody, description, method, summary } = data
|
||||||
@@ -86,7 +87,7 @@ const Method = ({ data, section, pathname, api }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getCurlJson = (properties, prefix, bodyParameters) => {
|
const getCurlJson = (properties, prefix, bodyParameters) => {
|
||||||
if (!properties[0]) {
|
if (!properties[0] || !jsonResponse) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const jsonObject = JSON.parse(jsonResponse)
|
const jsonObject = JSON.parse(jsonResponse)
|
||||||
|
|||||||
Reference in New Issue
Block a user