mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Merge pull request #155 from oceanprotocol/feature/squid-java
squid-java API docs
This commit is contained in:
commit
25194e97d4
@ -39,6 +39,14 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
from: '/tutorials/wallets/',
|
from: '/tutorials/wallets/',
|
||||||
to: '/concepts/wallets/'
|
to: '/concepts/wallets/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
from: '/references/squid-py/',
|
||||||
|
to: 'https://squid-py.readthedocs.io/en/latest/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
from: '/references/squid-java/',
|
||||||
|
to: 'https://www.javadoc.io/doc/com.oceanprotocol/squid/'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
title: Squid-Java API Reference
|
|
||||||
---
|
|
||||||
|
|
||||||
Coming soon. For now, please see the squid-java source code on GitHub.
|
|
||||||
|
|
||||||
<repo name="squid-java"></repo>
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
title: Squid-py API Reference
|
|
||||||
---
|
|
||||||
|
|
||||||
ReadTheDocs hosts the [squid-py API Reference Docs](https://squid-py.readthedocs.io/en/latest/).
|
|
@ -26,11 +26,11 @@
|
|||||||
- name: squid-py
|
- name: squid-py
|
||||||
links:
|
links:
|
||||||
- name: API reference
|
- name: API reference
|
||||||
url: /references/squid-py/
|
url: https://squid-py.readthedocs.io/en/latest/
|
||||||
- name: squid-java
|
- name: squid-java
|
||||||
links:
|
links:
|
||||||
- name: API reference
|
- name: API reference
|
||||||
url: /references/squid-java/
|
url: https://www.javadoc.io/doc/com.oceanprotocol/squid/
|
||||||
- name: Plecos
|
- name: Plecos
|
||||||
|
|
||||||
- group: OceanDB
|
- group: OceanDB
|
||||||
|
@ -21,9 +21,9 @@
|
|||||||
- group: squid-py
|
- group: squid-py
|
||||||
items:
|
items:
|
||||||
- title: API Reference
|
- title: API Reference
|
||||||
link: /references/squid-py/
|
link: https://squid-py.readthedocs.io/en/latest/
|
||||||
|
|
||||||
- group: squid-java
|
- group: squid-java
|
||||||
items:
|
items:
|
||||||
- title: API Reference
|
- title: API Reference
|
||||||
link: /references/squid-java/
|
link: https://www.javadoc.io/doc/com.oceanprotocol/squid/
|
||||||
|
@ -152,51 +152,50 @@ exports.createPages = ({ graphql, actions }) => {
|
|||||||
//
|
//
|
||||||
// Create pages from swagger json files
|
// Create pages from swagger json files
|
||||||
//
|
//
|
||||||
|
const swaggerSpecs = [
|
||||||
|
'./data/aquarius.json',
|
||||||
|
'./data/brizo.json'
|
||||||
|
]
|
||||||
const apiSwaggerTemplate = path.resolve(
|
const apiSwaggerTemplate = path.resolve(
|
||||||
'./src/templates/Swagger/index.jsx'
|
'./src/templates/Swagger/index.jsx'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
swaggerSpecs.forEach(spec => {
|
||||||
|
const api = require(spec) // eslint-disable-line
|
||||||
|
const name = path
|
||||||
|
.basename(spec)
|
||||||
|
.split('.json')
|
||||||
|
.join('')
|
||||||
|
const slug = `/references/${name}/`
|
||||||
|
|
||||||
|
createPage({
|
||||||
|
path: slug,
|
||||||
|
component: apiSwaggerTemplate,
|
||||||
|
context: {
|
||||||
|
slug,
|
||||||
|
api
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// Swagger Pet Store example, fetch from remote
|
||||||
const petStoreSlug = '/references/petstore/'
|
const petStoreSlug = '/references/petstore/'
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const spec = await getSpec()
|
const api = await getSpec()
|
||||||
|
|
||||||
createPage({
|
createPage({
|
||||||
path: petStoreSlug,
|
path: petStoreSlug,
|
||||||
component: apiSwaggerTemplate,
|
component: apiSwaggerTemplate,
|
||||||
context: {
|
context: {
|
||||||
slug: petStoreSlug,
|
slug: petStoreSlug,
|
||||||
api: spec
|
api
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
|
|
||||||
const aquariusSpecs = require('./data/aquarius.json')
|
|
||||||
const aquariusSlug = '/references/aquarius/'
|
|
||||||
|
|
||||||
createPage({
|
|
||||||
path: aquariusSlug,
|
|
||||||
component: apiSwaggerTemplate,
|
|
||||||
context: {
|
|
||||||
slug: aquariusSlug,
|
|
||||||
api: aquariusSpecs
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const brizoSpecs = require('./data/brizo.json')
|
|
||||||
const brizoSlug = '/references/brizo/'
|
|
||||||
|
|
||||||
createPage({
|
|
||||||
path: brizoSlug,
|
|
||||||
component: apiSwaggerTemplate,
|
|
||||||
context: {
|
|
||||||
slug: brizoSlug,
|
|
||||||
api: brizoSpecs
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create pages from TypeDoc json files
|
// Create pages from TypeDoc json files
|
||||||
//
|
//
|
||||||
|
23
package.json
23
package.json
@ -26,15 +26,15 @@
|
|||||||
"@oceanprotocol/art": "^2.2.0",
|
"@oceanprotocol/art": "^2.2.0",
|
||||||
"axios": "^0.18.0",
|
"axios": "^0.18.0",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"gatsby": "^2.2.8",
|
"gatsby": "^2.3.2",
|
||||||
"gatsby-image": "^2.0.34",
|
"gatsby-image": "^2.0.35",
|
||||||
"gatsby-plugin-catch-links": "^2.0.13",
|
"gatsby-plugin-catch-links": "^2.0.13",
|
||||||
"gatsby-plugin-google-analytics": "^2.0.17",
|
"gatsby-plugin-google-analytics": "^2.0.18",
|
||||||
"gatsby-plugin-manifest": "^2.0.24",
|
"gatsby-plugin-manifest": "^2.0.24",
|
||||||
"gatsby-plugin-offline": "^2.0.25",
|
"gatsby-plugin-offline": "^2.0.25",
|
||||||
"gatsby-plugin-react-helmet": "^3.0.10",
|
"gatsby-plugin-react-helmet": "^3.0.11",
|
||||||
"gatsby-plugin-sass": "^2.0.11",
|
"gatsby-plugin-sass": "^2.0.11",
|
||||||
"gatsby-plugin-sharp": "^2.0.30",
|
"gatsby-plugin-sharp": "^2.0.31",
|
||||||
"gatsby-plugin-sitemap": "^2.0.10",
|
"gatsby-plugin-sitemap": "^2.0.10",
|
||||||
"gatsby-plugin-svgr": "^2.0.2",
|
"gatsby-plugin-svgr": "^2.0.2",
|
||||||
"gatsby-remark-autolink-headers": "^2.0.16",
|
"gatsby-remark-autolink-headers": "^2.0.16",
|
||||||
@ -50,13 +50,14 @@
|
|||||||
"gatsby-source-graphql": "^2.0.15",
|
"gatsby-source-graphql": "^2.0.15",
|
||||||
"gatsby-transformer-remark": "^2.3.8",
|
"gatsby-transformer-remark": "^2.3.8",
|
||||||
"gatsby-transformer-sharp": "^2.1.17",
|
"gatsby-transformer-sharp": "^2.1.17",
|
||||||
"gatsby-transformer-yaml": "^2.1.10",
|
"gatsby-transformer-xml": "^2.0.9",
|
||||||
|
"gatsby-transformer-yaml": "^2.1.11",
|
||||||
"giphy-js-sdk-core": "^1.0.6",
|
"giphy-js-sdk-core": "^1.0.6",
|
||||||
"intersection-observer": "^0.5.1",
|
"intersection-observer": "^0.5.1",
|
||||||
"node-sass": "^4.11.0",
|
"node-sass": "^4.11.0",
|
||||||
"prismjs": "^1.15.0",
|
"prismjs": "^1.16.0",
|
||||||
"react": "^16.8.4",
|
"react": "^16.8.5",
|
||||||
"react-dom": "^16.8.4",
|
"react-dom": "^16.8.5",
|
||||||
"react-helmet": "^5.2.0",
|
"react-helmet": "^5.2.0",
|
||||||
"react-scrollspy": "^3.4.0",
|
"react-scrollspy": "^3.4.0",
|
||||||
"rehype-react": "^3.1.0",
|
"rehype-react": "^3.1.0",
|
||||||
@ -64,7 +65,7 @@
|
|||||||
"remark-github-plugin": "^1.3.1",
|
"remark-github-plugin": "^1.3.1",
|
||||||
"remark-react": "^5.0.1",
|
"remark-react": "^5.0.1",
|
||||||
"slugify": "^1.3.4",
|
"slugify": "^1.3.4",
|
||||||
"smoothscroll-polyfill": "^0.4.3",
|
"smoothscroll-polyfill": "^0.4.4",
|
||||||
"swagger-client": "^3.8.25"
|
"swagger-client": "^3.8.25"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -74,7 +75,7 @@
|
|||||||
"eslint-config-oceanprotocol": "^1.3.0",
|
"eslint-config-oceanprotocol": "^1.3.0",
|
||||||
"eslint-config-prettier": "^4.1.0",
|
"eslint-config-prettier": "^4.1.0",
|
||||||
"eslint-plugin-prettier": "^3.0.1",
|
"eslint-plugin-prettier": "^3.0.1",
|
||||||
"markdownlint-cli": "^0.14.0",
|
"markdownlint-cli": "^0.14.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"ora": "^3.2.0",
|
"ora": "^3.2.0",
|
||||||
"prettier": "^1.16.4",
|
"prettier": "^1.16.4",
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Link } from 'gatsby'
|
import { Link } from 'gatsby'
|
||||||
|
import { ReactComponent as External } from '../images/external.svg'
|
||||||
import styles from './Sidebar.module.scss'
|
import styles from './Sidebar.module.scss'
|
||||||
|
|
||||||
const SidebarLink = ({ link, title, linkClasses }) => {
|
const SidebarLink = ({ link, title, linkClasses }) => {
|
||||||
@ -13,7 +14,7 @@ const SidebarLink = ({ link, title, linkClasses }) => {
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
{title}
|
{title} <External className={styles.external} />
|
||||||
</a>
|
</a>
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
@ -152,3 +152,10 @@
|
|||||||
border-left-color: $green;
|
border-left-color: $green;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.external {
|
||||||
|
fill: $brand-grey-light;
|
||||||
|
display: inline-block;
|
||||||
|
width: $font-size-mini;
|
||||||
|
height: $font-size-mini;
|
||||||
|
}
|
||||||
|
3
src/images/external.svg
Normal file
3
src/images/external.svg
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="9" height="10" viewBox="0 0 9 10">
|
||||||
|
<polygon points="76.674 148.098 75.948 147.373 82.277 141.044 76.562 141.102 76.573 140.066 84.057 139.989 83.981 147.473 82.944 147.484 83.002 141.77" transform="translate(-76 -139)"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 277 B |
@ -54,3 +54,14 @@
|
|||||||
font-family: $font-family-monospace;
|
font-family: $font-family-monospace;
|
||||||
color: $brand-grey-light;
|
color: $brand-grey-light;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pathName {
|
||||||
|
font-size: $font-size-h3;
|
||||||
|
border-bottom: 1px solid $brand-grey-lighter;
|
||||||
|
padding-bottom: $spacer / 2;
|
||||||
|
margin-top: $spacer * 2;
|
||||||
|
margin-bottom: $spacer / $line-height;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
word-wrap: break-word;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
|
|||||||
import slugify from 'slugify'
|
import slugify from 'slugify'
|
||||||
import { cleanPathKey } from './utils'
|
import { cleanPathKey } from './utils'
|
||||||
import styles from './Paths.module.scss'
|
import styles from './Paths.module.scss'
|
||||||
|
import stylesDoc from '../Doc.module.scss'
|
||||||
|
|
||||||
const ParameterExample = ({ properties }) => (
|
const ParameterExample = ({ properties }) => (
|
||||||
//
|
//
|
||||||
@ -146,7 +147,7 @@ Method.propTypes = {
|
|||||||
const Paths = ({ paths }) =>
|
const Paths = ({ paths }) =>
|
||||||
Object.entries(paths).map(([key, value]) => (
|
Object.entries(paths).map(([key, value]) => (
|
||||||
<div key={key} id={slugify(cleanPathKey(key))}>
|
<div key={key} id={slugify(cleanPathKey(key))}>
|
||||||
<h2 className={styles.pathName}>
|
<h2 className={stylesDoc.pathName}>
|
||||||
<code>{cleanPathKey(key)}</code>
|
<code>{cleanPathKey(key)}</code>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
@ -1,18 +1,5 @@
|
|||||||
@import 'variables';
|
@import 'variables';
|
||||||
|
|
||||||
.pathName {
|
|
||||||
font-size: $font-size-h3;
|
|
||||||
border-bottom: 1px solid $brand-grey-lighter;
|
|
||||||
padding-bottom: $spacer / 2;
|
|
||||||
margin-top: $spacer * 2;
|
|
||||||
margin-bottom: $spacer;
|
|
||||||
|
|
||||||
code {
|
|
||||||
// stylelint-disable-next-line
|
|
||||||
background: none !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.pathMethod {
|
.pathMethod {
|
||||||
font-size: $font-size-base;
|
font-size: $font-size-base;
|
||||||
font-family: $font-family-monospace;
|
font-family: $font-family-monospace;
|
||||||
|
@ -1,18 +1,8 @@
|
|||||||
@import 'variables';
|
@import 'variables';
|
||||||
|
|
||||||
.entityName {
|
.entityName {
|
||||||
|
composes: pathName from '../Doc.module.scss';
|
||||||
font-size: $font-size-h2;
|
font-size: $font-size-h2;
|
||||||
border-bottom: 1px solid $brand-grey-lighter;
|
|
||||||
padding-bottom: $spacer / 2;
|
|
||||||
margin-top: $spacer * 2;
|
|
||||||
margin-bottom: $spacer;
|
|
||||||
|
|
||||||
code {
|
|
||||||
// stylelint-disable declaration-no-important
|
|
||||||
background: none !important;
|
|
||||||
padding: 0 !important;
|
|
||||||
// stylelint-enable declaration-no-important
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.entityDescription {
|
.entityDescription {
|
||||||
|
Loading…
Reference in New Issue
Block a user