mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Fix build issue
This commit is contained in:
parent
cda2edcc01
commit
0e658d7257
@ -202,7 +202,9 @@ const createTypeDocPage = async (createPage, name, downloadUrl) => {
|
||||
// https://github.com/swagger-api/swagger-js
|
||||
const fetchSwaggerSpec = async (component) => {
|
||||
try {
|
||||
const client = await Swagger(`http://localhost:5000/spec`)
|
||||
const client = await Swagger(
|
||||
`https://${component}.mainnet.oceanprotocol.com/spec`
|
||||
)
|
||||
return client.spec // The resolved spec
|
||||
|
||||
// client.originalSpec // In case you need it
|
||||
|
@ -4,9 +4,7 @@ import slugify from 'slugify'
|
||||
import { cleanPathKey } from './utils'
|
||||
import styles from './Paths.module.scss'
|
||||
import stylesDoc from '../Doc.module.scss'
|
||||
const ResponseExample = React.lazy(() =>
|
||||
import("./ResponseExample")
|
||||
)
|
||||
const ResponseExample = React.lazy(() => import('./ResponseExample'))
|
||||
const ParameterExample = ({ properties }) => (
|
||||
//
|
||||
// HEADS UP!
|
||||
@ -91,9 +89,10 @@ Parameters.propTypes = {
|
||||
}
|
||||
|
||||
const Responses = ({ responses }) => {
|
||||
const isSSR = typeof window === "undefined"
|
||||
const isSSR = typeof window === 'undefined'
|
||||
|
||||
return (<>
|
||||
return (
|
||||
<>
|
||||
<h4 className={styles.subHeading}>Responses</h4>
|
||||
{Object.keys(responses).map((key) => (
|
||||
<div key={key} className={styles.response}>
|
||||
@ -108,7 +107,8 @@ const Responses = ({ responses }) => {
|
||||
</>
|
||||
</div>
|
||||
))}
|
||||
</>)
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Responses.propTypes = {
|
||||
|
@ -1,10 +1,8 @@
|
||||
import React from "react"
|
||||
import PropTypes from "prop-types"
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import ReactJson from 'react-json-view'
|
||||
|
||||
|
||||
const ResponseExample = ({ examples }) => {
|
||||
|
||||
if (!examples) return null
|
||||
const jsonExample = examples['application/json']
|
||||
const plainText = examples['text/plain']
|
||||
|
Loading…
x
Reference in New Issue
Block a user