Skip to content

Commit

Permalink
Merge pull request #11 from rikoe/app-directory-api
Browse files Browse the repository at this point in the history
Add and link static OpenAPI web page generated with redoc
  • Loading branch information
rikoe authored Jan 25, 2019
2 parents 99377cc + dee4cca commit c96e7d5
Show file tree
Hide file tree
Showing 6 changed files with 341 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ script:
- git config --global user.name "${GH_NAME}"
- git config --global user.email "${GH_EMAIL}"
- echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc
- cd website && yarn install && GIT_USER="${GH_NAME}" yarn run publish-gh-pages
- cd website && yarn install && yarn run redoc-appd && GIT_USER="${GH_NAME}" yarn run publish-gh-pages
14 changes: 11 additions & 3 deletions docs/appd-spec.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
---
id: appd-spec
sidebar_label: App Directory Specification
title: App Directory Specification
hide_title: true
title: App Directory Specification (Draft)
---
## API

# App Directory Specification (Draft)
View the [full specification](/FDC3/appd-spec) in [OpenAPI v3.0](https://www.openapis.org/) format (generated with [ReDoc](https://rebilly.github.io/ReDoc/)).

## Endpoints

Endpoint | Method | Description
------------------ | ------ | -----------
`/v1/apps` | POST | Create a new application definition
`/v1/apps/{appId}` | GET | Retrieve an application defintion
`/v1/apps/search` | GET | Retrieve a list of applications
1 change: 1 addition & 0 deletions website/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
6 changes: 4 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"publish-gh-pages": "docusaurus-publish",
"write-translations": "docusaurus-write-translations",
"version": "docusaurus-version",
"rename-version": "docusaurus-rename-version"
"rename-version": "docusaurus-rename-version",
"redoc-appd": "redoc-cli bundle --output pages/en/appd-spec.html ../src/app-directory/specification/appd.yaml"
},
"devDependencies": {
"docusaurus": "1.6.2"
"docusaurus": "1.6.2",
"redoc-cli": "0.7.0"
}
}
321 changes: 321 additions & 0 deletions website/pages/en/appd-spec.html

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion website/siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const siteConfig = {
{doc: 'use-cases/use-cases-intro', label: 'Use Cases'},
{page: 'help', label: 'Community'},
{page: 'help', label: 'About'},
{blog: true, label: 'News'},
{blog: true, label: 'News'}
],

// If you have users set above, you add it here:
Expand Down Expand Up @@ -81,6 +81,8 @@ const siteConfig = {
// No .html extensions for paths.
cleanUrl: true,

wrapPagesHTML: true,

// Open Graph and Twitter card images.
ogImage: 'img/docusaurus.png',
twitterImage: 'img/docusaurus.png',
Expand Down

0 comments on commit c96e7d5

Please sign in to comment.