mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
ISsue-#850: Aquarius rest api
This commit is contained in:
parent
cc53a21d3e
commit
badeecf22b
@ -92,11 +92,11 @@ module.exports = {
|
|||||||
swaggerComponents: [
|
swaggerComponents: [
|
||||||
{
|
{
|
||||||
name: 'aquarius',
|
name: 'aquarius',
|
||||||
url: 'https://aquarius.oceanprotocol.com/spec'
|
url: 'https://v4.aquarius.oceanprotocol.com/spec'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'provider',
|
name: 'provider',
|
||||||
url: 'https://provider.mainnet.oceanprotocol.com/spec'
|
url: 'https://v4.provider.mainnet.oceanprotocol.com'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ To do so, create a Dockerfile with the appropriate instructions for dependency m
|
|||||||
|
|
||||||
We also collect some [example images](https://github.com/oceanprotocol/algo_dockers) which you can also view in Dockerhub.
|
We also collect some [example images](https://github.com/oceanprotocol/algo_dockers) which you can also view in Dockerhub.
|
||||||
|
|
||||||
When publishing an algorithm through the [Ocean Market](https://market.oceanprotoco.com), these properties can be set via the publish UI.
|
When publishing an algorithm through the [Ocean Market](https://market.oceanprotocol.com), these properties can be set via the publish UI.
|
||||||
|
|
||||||
### Environment Examples
|
### Environment Examples
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ module.exports = {
|
|||||||
name: 'repo-read-the-docs',
|
name: 'repo-read-the-docs',
|
||||||
remote: `https://github.com/oceanprotocol/readthedocs.git`,
|
remote: `https://github.com/oceanprotocol/readthedocs.git`,
|
||||||
local: 'markdowns/',
|
local: 'markdowns/',
|
||||||
branch: 'main',
|
branch: 'v4',
|
||||||
patterns: [
|
patterns: [
|
||||||
'markdowns/ocean-py',
|
'markdowns/ocean-py',
|
||||||
'markdowns/aquarius',
|
'markdowns/aquarius',
|
||||||
|
@ -165,6 +165,27 @@ exports.createPages = ({ graphql, actions }) => {
|
|||||||
const providerList = filterMarkdownList(markdowns, 'provider')
|
const providerList = filterMarkdownList(markdowns, 'provider')
|
||||||
const subgraphList = filterMarkdownList(markdowns, 'ocean-subgraph')
|
const subgraphList = filterMarkdownList(markdowns, 'ocean-subgraph')
|
||||||
|
|
||||||
|
// const aquariusRestApi = getRestApiPageFromMarkdownList(
|
||||||
|
// markdowns,
|
||||||
|
// 'aquarius'
|
||||||
|
// )[0].node
|
||||||
|
|
||||||
|
// await createRestApiPage(
|
||||||
|
// createPage,
|
||||||
|
// aquariusRestApi,
|
||||||
|
// `/references/aquarius`
|
||||||
|
// )
|
||||||
|
|
||||||
|
// const providerRestApi = getRestApiPageFromMarkdownList(
|
||||||
|
// markdowns,
|
||||||
|
// 'provider'
|
||||||
|
// )[0].node
|
||||||
|
// await createRestApiPage(
|
||||||
|
// createPage,
|
||||||
|
// providerRestApi,
|
||||||
|
// `/references/provider`
|
||||||
|
// )
|
||||||
|
|
||||||
await createReadTheDocsPage(createPage, 'ocean-py', oceanPyList)
|
await createReadTheDocsPage(createPage, 'ocean-py', oceanPyList)
|
||||||
await createReadTheDocsPage(createPage, 'provider', providerList)
|
await createReadTheDocsPage(createPage, 'provider', providerList)
|
||||||
await createReadTheDocsPage(createPage, 'ocean-subgraph', subgraphList)
|
await createReadTheDocsPage(createPage, 'ocean-subgraph', subgraphList)
|
||||||
@ -292,3 +313,21 @@ const createReadTheDocsPage = async (createPage, name, list) => {
|
|||||||
const filterMarkdownList = (markdownList, string) => {
|
const filterMarkdownList = (markdownList, string) => {
|
||||||
return markdownList.filter(({ node }) => node.frontmatter.app === string)
|
return markdownList.filter(({ node }) => node.frontmatter.app === string)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// const createRestApiPage = async (createPage, node, slug) => {
|
||||||
|
// const template = path.resolve('./src/templates/RestApi.jsx')
|
||||||
|
// createPage({
|
||||||
|
// path: slug,
|
||||||
|
// component: template,
|
||||||
|
// context: {
|
||||||
|
// node,
|
||||||
|
// slug
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const getRestApiPageFromMarkdownList = (markdownList, string) => {
|
||||||
|
// return markdownList.filter(({ node }) => {
|
||||||
|
// return node.frontmatter.app === string && node.frontmatter.slug === 'API.md'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
48
src/templates/RestApi.jsx
Normal file
48
src/templates/RestApi.jsx
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import { Helmet } from 'react-helmet'
|
||||||
|
import Layout from '../components/Layout'
|
||||||
|
import Content from '../components/Content'
|
||||||
|
import HeaderSection from '../components/HeaderSection'
|
||||||
|
import Sidebar from '../components/Sidebar'
|
||||||
|
import stylesDoc from '../templates/Doc.module.scss'
|
||||||
|
import Seo from '../components/Seo'
|
||||||
|
import DocContent from '../components/DocContent'
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
|
|
||||||
|
export default function RestApiDoc({ location, pageContext }) {
|
||||||
|
const { node, slug } = pageContext
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Helmet>
|
||||||
|
<body className="references" />
|
||||||
|
</Helmet>
|
||||||
|
|
||||||
|
<Seo
|
||||||
|
title="Rest api documentation"
|
||||||
|
description=""
|
||||||
|
slug={slug}
|
||||||
|
article
|
||||||
|
location={location}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Layout location={location}>
|
||||||
|
<HeaderSection title="Rest Api documentation" />
|
||||||
|
<Content>
|
||||||
|
<main className={stylesDoc.wrapper}>
|
||||||
|
<aside className={stylesDoc.sidebar}>
|
||||||
|
<Sidebar location={location} sidebar="references" collapsed />
|
||||||
|
</aside>
|
||||||
|
<article className={stylesDoc.main}>
|
||||||
|
<DocContent html={node.html} htmlAst={node.htmlAst} />
|
||||||
|
</article>
|
||||||
|
</main>
|
||||||
|
</Content>
|
||||||
|
</Layout>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
RestApiDoc.propTypes = {
|
||||||
|
location: PropTypes.object.isRequired,
|
||||||
|
pageContext: PropTypes.object.isRequired
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user