From 78c7e37ecb3ac511dfbd46bc02be67f0a7cadc2b Mon Sep 17 00:00:00 2001 From: Ivan Shvets <37488015+Leocete@users.noreply.github.com> Date: Fri, 2 Jul 2021 18:14:26 +0300 Subject: [PATCH 01/43] chore: changed docs sync flow --- .github/workflows/sync.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 6ff78faa..ba673bd0 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -14,3 +14,5 @@ jobs: uses: Redocly/repo-file-sync-action@master with: GH_PAT: ${{ secrets.GH_PAT }} + COMMIT_PREFIX: "sync:" + SKIP_PR: true From a7a1efd83fc4d2a896641d0f0e9703301e4a09c0 Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 5 Jul 2021 15:50:43 +0300 Subject: [PATCH 02/43] chore: added security section into pull request template --- .github/pull_request_template.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..7de82936 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,18 @@ +## What/Why/How? + +## Reference + +## Testing + +## Screenshots (optional) + +## Check yourself + +- [ ] Code is linted +- [ ] Tested +- [ ] All new/updated code is covered with tests + +## Security + +- [ ] Security impact of change has been considered +- [ ] Code follows company security practices and guidelines From eba55124c970eab3da606bc12c2ce6f7ee2fea1a Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Fri, 9 Jul 2021 08:25:52 +0100 Subject: [PATCH 03/43] docs: improve the redoc cli README (#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 --- cli/README.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/cli/README.md b/cli/README.md index 32bb0e0e..bc6d8bcf 100644 --- a/cli/README.md +++ b/cli/README.md @@ -3,20 +3,29 @@ **[ReDoc](https://github.com/Redocly/redoc)'s Command Line Interface** ## Installation -You can use redoc cli by installing `redoc-cli` globally or using [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b). + +You can use `redoc-cli` by installing [the package](https://www.npmjs.com/package/redoc-cli) globally, +or using [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b). ## Usage -Two following commands are available: +The two following commands are available: -- `redoc-cli serve [spec]` - starts the server with `spec` rendered with ReDoc. Supports SSR mode (`--ssr`) and can watch the spec (`--watch`) -- `redoc-cli bundle [spec]` - bundles spec and ReDoc into **zero-dependency** HTML file. +- `redoc-cli serve [spec]` - starts the server with `spec` rendered with ReDoc. + Supports a server-side rendering mode (`--ssr`), + and can watch the spec (`--watch`) to automatically reload the page whenever it changes. +- `redoc-cli bundle [spec]` - bundles `spec` and ReDoc into a **zero-dependency** HTML file. Some examples: -- Bundle with main color changed to `orange`:
`$ redoc-cli bundle [spec] --options.theme.colors.primary.main=orange` -- Serve with `nativeScrollbars` option set to true:
`$ redoc-cli serve [spec] --options.nativeScrollbars` -- Bundle using custom template (check [default template](https://github.com/Redocly/redoc/blob/master/cli/template.hbs) for reference):
`$ redoc-cli bundle [spec] -t custom.hbs` -- Bundle using custom template and add custom `templateOptions`:
`$ redoc-cli bundle [spec] -t custom.hbs --templateOptions.metaDescription "Page meta description"` +- Bundle with the main color changed to `orange`:
+ `$ redoc-cli bundle [spec] --options.theme.colors.primary.main=orange` +- Serve with the `nativeScrollbars` option set to true:
+ `$ redoc-cli serve [spec] --options.nativeScrollbars` +- Bundle using a custom [Handlebars](https://handlebarsjs.com/) template + (check the [default template](https://github.com/Redocly/redoc/blob/master/cli/template.hbs) for an example):
+ `$ redoc-cli bundle [spec] -t custom.hbs` +- Bundle using a custom template and add custom `templateOptions`:
+ `$ redoc-cli bundle [spec] -t custom.hbs --templateOptions.metaDescription "Page meta description"` -For more details run `redoc-cli --help`. +For more details, run `redoc-cli --help`. From ec50858ec47af08c5fe553266fe3c209fba97eae Mon Sep 17 00:00:00 2001 From: ILya Volchenkov Date: Fri, 9 Jul 2021 10:33:36 +0300 Subject: [PATCH 04/43] feat: added localization for some labels (#1675) --- src/components/ApiInfo/ApiInfo.tsx | 5 +++-- src/components/RequestSamples/RequestSamples.tsx | 3 ++- src/components/ResponseSamples/ResponseSamples.tsx | 3 ++- src/components/Responses/ResponsesList.tsx | 3 ++- src/services/Labels.ts | 12 ++++++++++++ 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/components/ApiInfo/ApiInfo.tsx b/src/components/ApiInfo/ApiInfo.tsx index ae4b4b20..6debaf7e 100644 --- a/src/components/ApiInfo/ApiInfo.tsx +++ b/src/components/ApiInfo/ApiInfo.tsx @@ -14,6 +14,7 @@ import { InfoSpanBox, InfoSpanBoxWrap, } from './styled.elements'; +import { l } from '../../services/Labels'; export interface ApiInfoProps { store: AppStore; @@ -79,14 +80,14 @@ export class ApiInfo extends React.Component { {!hideDownloadButton && (

- Download OpenAPI specification: + {l('downloadSpecification')}: - Download + {l('download')}

)} diff --git a/src/components/RequestSamples/RequestSamples.tsx b/src/components/RequestSamples/RequestSamples.tsx index 89b12d74..7a06d89f 100644 --- a/src/components/RequestSamples/RequestSamples.tsx +++ b/src/components/RequestSamples/RequestSamples.tsx @@ -6,6 +6,7 @@ import { SourceCodeWithCopy } from '../SourceCode/SourceCode'; import { RightPanelHeader, Tab, TabList, TabPanel, Tabs } from '../../common-elements'; import { OptionsContext } from '../OptionsProvider'; +import { l } from '../../services/Labels'; export interface RequestSamplesProps { operation: OperationModel; @@ -26,7 +27,7 @@ export class RequestSamples extends React.Component { return ( (hasSamples && (
- Request samples + {l('requestSamples')}