Skip to content

Commit 815717c

Browse files
authored
Merge pull request #112 from linode/development
Deploy
2 parents 7a0bc31 + 8046f3d commit 815717c

File tree

10 files changed

+71
-490
lines changed

10 files changed

+71
-490
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sudo: false
22
language: python
33
python:
4-
- 3.7
4+
- 3.7
55
script:
6-
- python openapi-linter.py openapi.yaml
6+
- python ./bin/lint openapi.yaml

Dockerfile

Lines changed: 0 additions & 32 deletions
This file was deleted.

Jenkinsfile

Lines changed: 0 additions & 109 deletions
This file was deleted.

README.md

Lines changed: 12 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,69 +2,33 @@
22

33
This is the Linode API OpenAPI 3 Schema
44

5-
## Implementation
6-
7-
We are using [ReDoc](https://github.com/Rebilly/ReDoc) as the front end
8-
UI for our OpenAPI specification.
9-
10-
Additionally, we are taking advantage of ReDoc's support of
11-
[Vendor Extensions](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md)
12-
such as `x-logo` and `x-code-samples` for extended functionality.
13-
14-
A CSS file has also been added to the html page, to allow customization to the
15-
output.
16-
175
## Requirements
186

19-
Per the [Deployment
20-
Guidelines](https://github.com/Rebilly/ReDoc#deployment) of the ReDoc
21-
specification, ReDoc must be installed on the server via yarn or npm.
22-
23-
**yarn:**
24-
```
25-
yarn add redoc
26-
```
7+
The linter used for the OpenAPI spec is written in python3.
8+
A virtualenv is recommended for local work.
279

28-
**NPM:**
2910
```
30-
npm install redoc --save
11+
virtualenv -p python3 venv
12+
source venv/bin/activate
13+
pip install -r requirements.txt
3114
```
3215

3316
## Development
3417

35-
Any http server serving this directory will work - simply reload the page to
36-
see changes. We're working on a nicer way to do this, but for now this should
37-
get you started:
18+
The spec can be linted using the `./bin/lint` helper.
3819

39-
```shell
40-
python3 -m http.server
20+
```
21+
python3 ./bin/lint openapi.yaml
4122
```
4223

4324
### Versioning
4425

45-
This specification is automatically versioned on build by Jenkins. The version
46-
presented in the spec is taken directly from the most recent annotated `git tag`
47-
to the build's `HEAD`. The package version appends the number of commits since
48-
the last tag to this number, separated by a hyphen. When making a new release
49-
you **must** tag the release with the correct semantic versioning-compliant
50-
version string so that all versions are populated appropriately.
51-
52-
### Updating Dependencies
26+
When making a new release you **must** tag the release with the correct semantic versioning-compliant version string so that all versions are populated appropriately.
27+
There is a `./bin/deploy` helper which will help with this process.
5328

54-
The ReDoc version we are using in this repo is from a fork of the mainline ReDoc
55-
repo, found [here](https://github.com/dnknapp/ReDoc). This fork has custom
56-
modifications for Linode. In order to update the ReDoc we are using, clone that
57-
repo, rebase it's HEAD onto the latest upstream ReDoc (if desired), and run the
58-
following commands to generate a `redoc.standalone.js`:
59-
60-
```bash
61-
yarn
62-
yarn bundle
63-
cp bundles/redoc.standalone.js /path/to/linode-api-docs/
6429
```
65-
66-
This file _is_ committed to this repository, _is_ packaged with this repo's deb,
67-
and _is_ referenced with a relative link on the server.
30+
./bin/deploy 0.1.0
31+
```
6832

6933
## Spec Extensions
7034

File renamed without changes.

build-docs.sh

Lines changed: 0 additions & 91 deletions
This file was deleted.

index.html

Lines changed: 0 additions & 24 deletions
This file was deleted.

linode-docs.postinst

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)