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: [
|
||||
{
|
||||
name: 'aquarius',
|
||||
url: 'https://aquarius.oceanprotocol.com/spec'
|
||||
url: 'https://v4.aquarius.oceanprotocol.com/spec'
|
||||
},
|
||||
{
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
|
@ -156,7 +156,7 @@ module.exports = {
|
||||
name: 'repo-read-the-docs',
|
||||
remote: `https://github.com/oceanprotocol/readthedocs.git`,
|
||||
local: 'markdowns/',
|
||||
branch: 'main',
|
||||
branch: 'v4',
|
||||
patterns: [
|
||||
'markdowns/ocean-py',
|
||||
'markdowns/aquarius',
|
||||
|
@ -165,6 +165,27 @@ exports.createPages = ({ graphql, actions }) => {
|
||||
const providerList = filterMarkdownList(markdowns, 'provider')
|
||||
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, 'provider', providerList)
|
||||
await createReadTheDocsPage(createPage, 'ocean-subgraph', subgraphList)
|
||||
@ -292,3 +313,21 @@ const createReadTheDocsPage = async (createPage, name, list) => {
|
||||
const filterMarkdownList = (markdownList, 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,5 +48,5 @@
|
||||
}
|
||||
|
||||
.searchButtonContainer {
|
||||
margin-top: $spacer * 0.5 ;
|
||||
margin-top: $spacer * 0.5;
|
||||
}
|
||||
|
@ -68,4 +68,4 @@ $narrowWidth: 35rem;
|
||||
|
||||
$box-shadow-color: rgba(0, 0, 0, 0.2);
|
||||
$border-color: #e2e2e2;
|
||||
$background-content: #fff;
|
||||
$background-content: #fff;
|
||||
|
@ -1,23 +1,23 @@
|
||||
@import 'variables';
|
||||
|
||||
.box {
|
||||
display: block;
|
||||
background: $background-content;
|
||||
border-radius: $border-radius;
|
||||
border: 1px solid $border-color;
|
||||
box-shadow: 0 6px 17px 0 $box-shadow-color;
|
||||
padding: $spacer * 0.5;
|
||||
}
|
||||
|
||||
@media (min-width: 40rem) {
|
||||
.box {
|
||||
padding: var($spacer);
|
||||
}
|
||||
}
|
||||
|
||||
a.box:hover,
|
||||
a.box:focus {
|
||||
outline: 0;
|
||||
transform: translate3d(0, -0.1rem, 0);
|
||||
box-shadow: 0 10px 25px 0 $box-shadow-color;
|
||||
display: block;
|
||||
background: $background-content;
|
||||
border-radius: $border-radius;
|
||||
border: 1px solid $border-color;
|
||||
box-shadow: 0 6px 17px 0 $box-shadow-color;
|
||||
padding: $spacer * 0.5;
|
||||
}
|
||||
|
||||
@media (min-width: 40rem) {
|
||||
.box {
|
||||
padding: var($spacer);
|
||||
}
|
||||
}
|
||||
|
||||
a.box:hover,
|
||||
a.box:focus {
|
||||
outline: 0;
|
||||
transform: translate3d(0, -0.1rem, 0);
|
||||
box-shadow: 0 10px 25px 0 $box-shadow-color;
|
||||
}
|
||||
|
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