Skip to content

Commit 63ead20

Browse files
glosierstasiukanyaRomanHotsiyjabba-jedikscheirer
authored
Redoc update (#5)
* feat: add new option hideSchemaPattern (Redocly#1475) * feat: add new option hideSchemaPattern * chore: add hideSchemaPattern option to readme * fix: add missed labels to elements (Redocly#1445) * chore: upgrade prism.js fixes Redocly#1455 * chore: Release 2.0.0-rc.48 🔖 * docs: fix `menuToggle` default value fixes Redocly#1476 [ci skip] * docs: fix the Rebilly link * chore(cli): v0.10.2 * fix: fix SourceCodeWithCopy component to be non-pure * docs: document theme options (Redocly#1438) * chore: remove duplicate semicolons (Redocly#1504) * fix: crash on multiple examples on parameter object fixes Redocly#1485 * fix: pass boolean and number values as a string in highlight function (Redocly#1512) * chore: Release 2.0.0-rc.49 🔖 * chore: update travis badge url * fix: background-color in search results (Redocly#1531) * fix: background-color in search results * Delete some changes * chore: clean up .travis.yaml * chore(cli): upgrade redoc to rc.49 * chore(cli): v0.10.3 * fix: false-positive recursive tag case when using oneOf + allOf (Redocly#1534) * fix: add includes polyfill fixes Redocly#1530 * chore: Release 2.0.0-rc.50 🔖 * chore(cli): v0.10.4 * docs: remove outdated config option from readme (Redocly#1543) * docs: minor syntax highlight fix on the README (Redocly#1549) * feat: add disable-google-font parameter to serve command in cli (Redocly#1558) * docs: remove extra word in grammar (Redocly#1539) * chore: use openapi-core to bundle definition instead of json-schema-ref-parser (Redocly#1500) * chore: use openapi-core to bundle definition instead of json-schema-ref-parser * chore: update: root and demo webpack configs * chore: refactor loadAndBundleSpec * chore: update vesions: openapi-core, redoc * chore: rolled back webpack.config(s) to previous version * chore: changed the way of creating core Config for bundling definition * fix: disable eslint react/display-name * fix: update nodejs version to 12 in travis config * chore: optimize verification: browser or server * chore: add fetch only for browser * Update src/utils/loadAndBundleSpec.ts * chore: isBrowser verification improvment Co-authored-by: Roman Hotsiy <[email protected]> * chore: unit tests to check loading and bundling api definitions with openapi-core (Redocly#1568) * chore: Release 2.0.0-rc.51 * chore(cli): v0.11.0 * chore(cli): v0.11.1 * fix: broken paths when budle or serve using cli (Redocly#1572) * chore(cli): v0.11.2 * chore: update openapi-core version to fix parsing root document * chore: Release 2.0.0-rc.52 * chore: Release 2.0.0-rc.53 * fix: added missing semicolon to styling (Redocly#1578) * docs: update specUrl (Redocly#1577) * chore(cli): v0.11.3 * fix: right absolute path for load and bundle definition (Redocly#1579) * chore(cli): v0.11.4 * chore: update(cli) engine node version >=12 (Redocly#1583) * fix: parse json theme string for standalone tag (Redocly#1492) * fix: use operation path if operation summary/description is not provided (Redocly#1596) resolves Redocly#1270 * feat: add basic support openApi 3.1 (Redocly#1622) * chore: upgrade dependencies (Redocly#1634) * chore: modernize build pipeline (Redocly#1635) * chore: remove extra webpack resolver * feat: merge refs oas 3.1 (Redocly#1640) * chore: v2.0.0-rc.54 * chore(cli): upgrade redoc to rc.54 * chore(cli): v0.12.0 * chore(cli): v0.12.1 * feat: added git folder sync config * chore: change cors url in the demo * fix: broken linkify fixes Redocly#1655 * fix: fix accidentally removed onLoaded fixes Redocly#1656 * chore: fix sync workflow * chore: v2.0.0-rc.55 * chore: fix demo slack url * chore: changed docs sync flow * chore: added security section into pull request template * docs: improve the redoc cli README (Redocly#1679) - Break some long lines - Add some articles (the, a) - Add a couple links for additional context - Expand the SSR acronym - Describe what --watch does * feat: added localization for some labels (Redocly#1675) * feat: add yaml highlight (Redocly#1684) * feat: add yaml highlight * chore: upgrade prism version * chore(cli): v0.12.2 * chore: bumps npm-shrinkwrap (Redocly#1688) * chore: upgrade shrinkwrap * chore: fix dockerfile * fix: handle empty object in security array (Redocly#1678) * docs: add real-life usage example: BoxKnight (Redocly#1651) * chore: add github template (Redocly#1708) * chore: add headers to github templates (Redocly#1710) * fix: improve openapi 3.1 (Redocly#1700) * fix: hideLoading options in redoc standalone (Redocly#1709) * feat: add github action to build docker images and push to ghcr.io on release (Redocly#1614) * fix: nullable object's fields were missing (Redocly#1721) * chore: up version for release (Redocly#1722) * chore: add change log for v2.0.0-rc.56(Redocly#1723) * chore(cli): v0.12.3 * docs(GSOD): Adds new quickstart doc (Redocly#1718) * docs: fix broken links in intro (Redocly#1730) * Removes content that is now in documentation and adds link to docs * fix: Schema for events incorrectly omits readOnly and includes writeOnly (Redocly#1720 Redocly#1540) * Apply suggestions from code review * Update README.md Co-authored-by: Adam Altman <[email protected]> * Updates readme with about section and organizes features list * Adds some notes to deployment * feat: new option generatedPayloadSamplesMaxDepth (Redocly#1642) * chore: update libs (Redocly#1707) * fix: Redoc spelling * Updates per reviews and adds new logo * Minor edits * fix: scrolling to the first item (Redocly#1753) * Adds comparison table and OpenAPI link section * Minor edit * Updates image src * fix: OpenAPI 3.1: Missing description when $ref used Redocly#1727 * fix: OpenAPI 3.1: Missing description when $ref used Redocly#1727 * fix: improve publish action scripts (Redocly#1729) * feat: add q/kdb+ syntax highlighting (Redocly#1605) * fix: The number of items in the array in the array is incorrect Redocly#1762 (Redocly#1763) * fix: fix deref logic for oas3.1 (Redocly#1767) * chore: remove commented out code (Redocly#1768) * fix: No match scenario in search (Redocly#1667) Co-authored-by: Alex Varchuk <[email protected]> * chore: v2.0.0-rc.57 (Redocly#1770) * chore: update publish cli workflow * chore: fix publish workflow and disable s3 demo * chore: fix publish workflow again * chore(cli): v0.13.0 (Redocly#1771) * chore: fix cli publish workflow * fix: Default boolean property value not rendered Redocly#1779 (Redocly#1781) * chore: remove broken badges from README * [GSoD]Reorganizes the quickstart into a deployment guide and quickstart (Redocly#1749) * Reorganizes the quickstart into a deployment guide and quickstart * Minor edits * fix: minor formatting issue * fix: simplify phrasing * Adds redirects, link to preview-docs docs, and other review edits * remove IE polyfills as IE is no longer supported Co-authored-by: Ivana Isadora Devcic <[email protected]> * sync: Synced local 'docs/' with remote 'docs/redoc/' * fix: mobile view in docker image (Redocly#1795) * sync: Synced local 'docs/' with remote 'docs/redoc/' * sync: Synced local 'docs/' with remote 'docs/redoc/' * chore: run prettier & add husky pre-commit hook (Redocly#1800) * fix: exclusiveMin/Max shows incorect range (Redocly#1799) * fix: exclusiveMin/Max shows incorect range * cover all number range cases & add unit tests * add more tests * fix maximum value * simplify humanizeNumberRange function * simplify exclusive checks * Update src/utils/openapi.ts Co-authored-by: Roman Hotsiy <[email protected]> * update test coverage * linting * revert weird prettier changes * add md files to prettier ignore Co-authored-by: Roman Hotsiy <[email protected]> * fix: add browser build for webpack 5 (Redocly#1796) * chore: v2.0.0-rc.58 (Redocly#1808) * chore(cli): v0.13.1 (Redocly#1809) * fix this Co-authored-by: Anna Stasiuk <[email protected]> Co-authored-by: romanhotsiy <[email protected]> Co-authored-by: jabba-jedi <[email protected]> Co-authored-by: Karl Scheirer <[email protected]> Co-authored-by: baijunyao <[email protected]> Co-authored-by: Anton Kozachuk <[email protected]> Co-authored-by: Oleksiy Kachynskyy <[email protected]> Co-authored-by: 迷渡 <[email protected]> Co-authored-by: Patrick Demers <[email protected]> Co-authored-by: Kurt Furbush <[email protected]> Co-authored-by: Andriy Leliv <[email protected]> Co-authored-by: Olivier Beaulieu <[email protected]> Co-authored-by: langhabel <[email protected]> Co-authored-by: Yevhenii Hyzyla <[email protected]> Co-authored-by: AlexVarchuk <[email protected]> Co-authored-by: Ivan Shvets <[email protected]> Co-authored-by: Ivan Shvets <[email protected]> Co-authored-by: Roman <[email protected]> Co-authored-by: Waldir Pimenta <[email protected]> Co-authored-by: ILya Volchenkov <[email protected]> Co-authored-by: Andrea Mugx <[email protected]> Co-authored-by: Valdir Mendes <[email protected]> Co-authored-by: Marius Butuc <[email protected]> Co-authored-by: Roelof Kallenkoot <[email protected]> Co-authored-by: Heather Cloward <[email protected]> Co-authored-by: Adam Altman <[email protected]> Co-authored-by: Andriy Zaleskyy <[email protected]> Co-authored-by: Ivana Isadora Devcic <[email protected]> Co-authored-by: Swapnil Ogale <[email protected]> Co-authored-by: Adam Altman <[email protected]> Co-authored-by: Mark Theisen <[email protected]> Co-authored-by: Roman Marshevskyy <[email protected]> Co-authored-by: kylenarocroc <[email protected]> Co-authored-by: Gabriel Simon Gianotti <[email protected]> Co-authored-by: raghavi92 <[email protected]> Co-authored-by: redocly-bot <null> Co-authored-by: Oprysk Vyacheslav <[email protected]>
1 parent 7bf11dd commit 63ead20

File tree

133 files changed

+42811
-14435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+42811
-14435
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module.exports = {
1717
version: 'detect',
1818
},
1919
},
20-
plugins: ['@typescript-eslint', 'import'],
2120
rules: {
2221
'@typescript-eslint/explicit-function-return-type': 'off',
2322
'@typescript-eslint/explicit-module-boundary-types': 'off',

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'type: bug'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**Expected behavior**
14+
A clear and concise description of what you expected to happen.
15+
16+
**Minimal reproducible OpenAPI snippet(if possible)**
17+
18+
**Screenshots**
19+
If applicable, add screenshots to help explain your problem.
20+
21+
**Additional context**
22+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the problem to be solved**
11+
A clear and concise description of what problem to be solved
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## What/Why/How?
2+
3+
## Reference
4+
5+
## Testing
6+
7+
## Screenshots (optional)
8+
9+
## Check yourself
10+
11+
- [ ] Code is linted
12+
- [ ] Tested
13+
- [ ] All new/updated code is covered with tests

.github/sync.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
group:
2+
- files:
3+
- source: docs/
4+
dest: docs/redoc
5+
repos: |
6+
Redocly/docs

.github/workflows/demo-deploy-s3.yml

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

.github/workflows/e2e-tests.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Tests e2e
2+
3+
on: [push]
4+
5+
jobs:
6+
build-and-e2e:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- run: npm ci
11+
- run: npm run bundle
12+
- run: npm run e2e

.github/workflows/main.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish Docker image
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
push_to_registry:
7+
name: Push Docker image to GitHub Packages
8+
runs-on: ubuntu-latest
9+
permissions:
10+
packages: write
11+
contents: read
12+
steps:
13+
- name: Check out the repo
14+
uses: actions/checkout@v2
15+
- name: Login to GitHub Container Registry
16+
uses: docker/login-action@v1
17+
with:
18+
registry: ghcr.io
19+
username: ${{ github.repository_owner }}
20+
password: ${{ secrets.GITHUB_TOKEN }}
21+
- name: Prepare
22+
id: prep
23+
run: |
24+
DOCKER_IMAGE=ghcr.io/redocly/redoc/cli
25+
VERSION=edge
26+
if [[ $GITHUB_REF == refs/tags/* ]]; then
27+
VERSION=${GITHUB_REF#refs/tags/}
28+
elif [[ $GITHUB_REF == refs/heads/* ]]; then
29+
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
30+
elif [[ $GITHUB_REF == refs/pull/* ]]; then
31+
VERSION=pr-${{ github.event.number }}
32+
fi
33+
TAGS="${DOCKER_IMAGE}:${VERSION}"
34+
if [ "${{ github.event_name }}" = "push" ]; then
35+
TAGS="$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}"
36+
fi
37+
echo ::set-output name=version::${VERSION}
38+
echo ::set-output name=tags::${TAGS}
39+
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
40+
- name: Push to GitHub Packages
41+
uses: docker/build-push-action@v2
42+
with:
43+
context: ./cli
44+
push: ${{ github.event_name != 'pull_request' }}
45+
tags: ${{ steps.prep.outputs.tags }}

.github/workflows/publish-cli.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Publish cli
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
9+
jobs:
10+
bundle:
11+
needs: [ check-version-cli ]
12+
if: needs.check-version-cli.outputs.changed == 'true'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-node@v2
17+
- name: Cache node modules
18+
uses: actions/cache@v2
19+
with:
20+
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
21+
key: npm-${{ hashFiles('package-lock.json') }}
22+
restore-keys: |
23+
npm-${{ hashFiles('package-lock.json') }}
24+
npm-
25+
- run: npm ci
26+
- run: npm run bundle
27+
- name: Store bundle artifact
28+
uses: actions/upload-artifact@v2
29+
with:
30+
name: bundles-cli
31+
path: bundles
32+
retention-days: 1
33+
unit-tests:
34+
needs: [ check-version-cli ]
35+
if: needs.check-version-cli.outputs.changed == 'true'
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v1
39+
- run: npm ci
40+
- run: npm test
41+
e2e-tests:
42+
needs: [ bundle ]
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v1
46+
- run: npm ci
47+
- name: Download bundled artifact
48+
uses: actions/download-artifact@v2
49+
with:
50+
name: bundles-cli
51+
path: bundles
52+
- run: npm run e2e
53+
bundle-cli:
54+
needs: [ check-version-cli ]
55+
if: needs.check-version-cli.outputs.changed == 'true'
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v2
59+
- uses: actions/setup-node@v2
60+
- name: Cache node modules
61+
uses: actions/cache@v2
62+
with:
63+
path: ~/.npm
64+
key: npm-${{ hashFiles('package-lock.json') }}
65+
restore-keys: |
66+
npm-${{ hashFiles('package-lock.json') }}
67+
npm-
68+
- name: Install dependencies
69+
run: npm ci
70+
- name: Bundle
71+
run: npm run compile:cli
72+
- name: Store bundle artifact
73+
uses: actions/upload-artifact@v2
74+
with:
75+
name: cli
76+
path: cli
77+
retention-days: 1
78+
check-version-cli:
79+
name: Check Version
80+
runs-on: ubuntu-latest
81+
outputs:
82+
changed: ${{ steps.check.outputs.changed }}
83+
steps:
84+
- name: Checkout repository
85+
uses: actions/checkout@v2
86+
- name: Set up Node.js
87+
uses: actions/setup-node@v2
88+
- name: Check if version has been updated
89+
id: check
90+
uses: EndBug/[email protected]
91+
with:
92+
file-name: ./cli/package.json
93+
file-url: https://unpkg.com/redoc-cli/package.json
94+
static-checking: localIsNew
95+
publish-cli:
96+
needs: [bundle-cli, unit-tests, e2e-tests]
97+
if: needs.check-version-cli.outputs.changed == 'true'
98+
runs-on: ubuntu-latest
99+
steps:
100+
- uses: actions/setup-node@v1
101+
with:
102+
node-version: "14.x"
103+
registry-url: 'https://registry.npmjs.org'
104+
- uses: actions/checkout@v2
105+
- name: Download cli bundled artifact
106+
uses: actions/download-artifact@v2
107+
with:
108+
name: cli
109+
path: cli
110+
- name: Cache node modules
111+
uses: actions/cache@v2
112+
with:
113+
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
114+
key: npm-${{ hashFiles('package-lock.json') }}
115+
restore-keys: |
116+
npm-${{ hashFiles('package-lock.json') }}
117+
npm-
118+
- name: Publish to NPM
119+
run: cd cli/ && npm publish
120+
env:
121+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- v[0-9]*.[0-9]*.[0-9]*
7+
8+
jobs:
9+
bundle:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
- name: Cache node modules
15+
uses: actions/cache@v2
16+
with:
17+
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
18+
key: npm-${{ hashFiles('package-lock.json') }}
19+
restore-keys: |
20+
npm-${{ hashFiles('package-lock.json') }}
21+
npm-
22+
- run: npm ci
23+
- run: npm run bundle
24+
- name: Store bundle artifact
25+
uses: actions/upload-artifact@v2
26+
with:
27+
name: bundles
28+
path: bundles
29+
retention-days: 1
30+
unit-tests:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v1
34+
- run: npm ci
35+
- run: npm test
36+
e2e-tests:
37+
needs: [bundle]
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v1
41+
- run: npm ci
42+
- name: Download bundled artifact
43+
uses: actions/download-artifact@v2
44+
with:
45+
name: bundles
46+
path: bundles
47+
- run: npm run e2e
48+
# disable this for now
49+
# deploy-demo:
50+
# needs: [bundle, unit-tests, e2e-tests]
51+
# runs-on: ubuntu-latest
52+
# steps:
53+
# - uses: actions/checkout@v1
54+
# - name: Configure AWS Credentials
55+
# uses: aws-actions/configure-aws-credentials@v1
56+
# with:
57+
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
58+
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
59+
# aws-region: us-east-1
60+
# - name: Install dependencies
61+
# run: npm ci
62+
# - name: Download bundled artifacts
63+
# uses: actions/download-artifact@v2
64+
# with:
65+
# name: bundles
66+
# path: bundles
67+
# - name: Build package
68+
# run: npm run build:demo
69+
# - name: Deploy to S3 bucket
70+
# run: npm run deploy:demo
71+
# - name: Invalidate
72+
# run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DEMO_DISTRIBUTION_ID }} --paths "/*"
73+
publish:
74+
needs: [bundle, unit-tests, e2e-tests]
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/setup-node@v1
78+
with:
79+
node-version: "14.x"
80+
registry-url: 'https://registry.npmjs.org'
81+
- uses: actions/checkout@v2
82+
- name: Download bundled artifacts
83+
uses: actions/download-artifact@v2
84+
with:
85+
name: bundles
86+
path: bundles
87+
- name: Cache node modules
88+
uses: actions/cache@v2
89+
with:
90+
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
91+
key: npm-${{ hashFiles('package-lock.json') }}
92+
restore-keys: |
93+
npm-${{ hashFiles('package-lock.json') }}
94+
npm-
95+
- name: Before deploy
96+
run: npm ci && npm run declarations
97+
- name: Publish to NPM
98+
run: npm publish
99+
env:
100+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)