From 64cf624ffffe9fe1bdda33a5b0726a1e6524de46 Mon Sep 17 00:00:00 2001 From: Alex Varchuk Date: Mon, 12 Sep 2022 19:28:47 +0300 Subject: [PATCH] chore: rename master branch to main (#2163) --- .github/CONTRIBUTING.md | 2 +- .github/workflows/publish-cli.yml | 2 +- .github/workflows/sync.yml | 6 +++--- README.md | 6 +++--- cli/README.md | 2 +- demo/index.tsx | 4 ++-- demo/openapi-3-1.yaml | 4 ++-- demo/openapi.yaml | 4 ++-- demo/swagger.yaml | 4 ++-- docs/deployment/docker.md | 2 +- .../__snapshots__/loadAndBundleSpec.test.ts.snap | 12 ++++++------ 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 9daca5cb..d53188f7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -14,7 +14,7 @@ Hi! We're really excited that you are interested in contributing to ReDoc. Befor ## Pull Request Guidelines Before submitting a pull request, please make sure the following is done: -1. Fork the repository and create your branch from master. +1. Fork the repository and create your branch from main. 2. Run `npm install` in the repository root. 3. If you’ve fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`npm test`). Tip: `npm test -- --watch TestName` is helpful in development. diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml index 8b91be9e..eca538a6 100644 --- a/.github/workflows/publish-cli.yml +++ b/.github/workflows/publish-cli.yml @@ -3,7 +3,7 @@ name: Publish cli on: push: branches: - - master + - main jobs: bundle: diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 18819cc7..98e42d33 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -2,7 +2,7 @@ name: Sync Files on: push: branches: - - master + - main workflow_dispatch: jobs: sync: @@ -11,8 +11,8 @@ jobs: - name: Checkout Repository uses: actions/checkout@v3 - name: Run GitHub File Sync - uses: Redocly/repo-file-sync-action@master + uses: Redocly/repo-file-sync-action@main with: GH_PAT: ${{ secrets.GH_PAT }} - COMMIT_PREFIX: "sync:" + COMMIT_PREFIX: 'sync:' SKIP_PR: true diff --git a/README.md b/README.md index 9ed71f79..dec53a39 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@
- Redoc logo + Redoc logo # Generate interactive API documentation from OpenAPI definitions - [![Build Status](https://travis-ci.com/Redocly/redoc.svg?branch=master)](https://travis-ci.com/Redocly/redoc) [![Coverage Status](https://coveralls.io/repos/Redocly/redoc/badge.svg?branch=master&service=github)](https://coveralls.io/github/Redocly/redoc?branch=master) [![npm](http://img.shields.io/npm/v/redoc.svg)](https://www.npmjs.com/package/redoc) [![License](https://img.shields.io/npm/l/redoc.svg)](https://github.com/Redocly/redoc/blob/master/LICENSE) + [![Build Status](https://travis-ci.com/Redocly/redoc.svg?branch=main)](https://travis-ci.com/Redocly/redoc) [![Coverage Status](https://coveralls.io/repos/Redocly/redoc/badge.svg?branch=main&service=github)](https://coveralls.io/github/Redocly/redoc?branch=main) [![npm](http://img.shields.io/npm/v/redoc.svg)](https://www.npmjs.com/package/redoc) [![License](https://img.shields.io/npm/l/redoc.svg)](https://github.com/Redocly/redoc/blob/main/LICENSE) [![bundle size](http://img.badgesize.io/https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js?compression=gzip&max=300000)](https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js) [![npm](https://img.shields.io/npm/dm/redoc.svg)](https://www.npmjs.com/package/redoc) [![](https://data.jsdelivr.com/v1/package/npm/redoc/badge)](https://www.jsdelivr.com/package/npm/redoc) [![Docker Build Status](https://img.shields.io/docker/build/redocly/redoc.svg)](https://hub.docker.com/r/redocly/redoc/)
@@ -21,7 +21,7 @@ By default Redoc offers a three-panel, responsive layout: - The central panel contains the documentation. - The right panel contains request and response examples. -![Redoc demo](https://raw.githubusercontent.com/Redocly/redoc/master/demo/redoc-demo.png) +![Redoc demo](https://raw.githubusercontent.com/Redocly/redoc/main/demo/redoc-demo.png) ## Live demo diff --git a/cli/README.md b/cli/README.md index 200e33f2..99c733fc 100644 --- a/cli/README.md +++ b/cli/README.md @@ -26,7 +26,7 @@ Some examples: - 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):
+ (check the [default template](https://github.com/Redocly/redoc/blob/main/cli/template.hbs) for an example):
`$ redoc-cli build [spec] -t custom.hbs` - Bundle using a custom template and add custom `templateOptions`:
`$ redoc-cli build [spec] -t custom.hbs --templateOptions.metaDescription "Page meta description"` diff --git a/demo/index.tsx b/demo/index.tsx index ea025f81..231d7f0a 100644 --- a/demo/index.tsx +++ b/demo/index.tsx @@ -21,7 +21,7 @@ const demos = [ ]; class DemoApp extends React.Component< - {}, + Record, { spec: object | undefined; specUrl: string; dropdownOpen: boolean; cors: boolean } > { constructor(props) { @@ -94,7 +94,7 @@ class DemoApp extends React.Component< diff --git a/demo/openapi-3-1.yaml b/demo/openapi-3-1.yaml index e960d523..4b2418c9 100644 --- a/demo/openapi-3-1.yaml +++ b/demo/openapi-3-1.yaml @@ -16,14 +16,14 @@ info: [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard - OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md). # OpenAPI Specification This API is documented in **OpenAPI format** and is based on [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard - OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md). # Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). diff --git a/demo/openapi.yaml b/demo/openapi.yaml index dabf41d4..afa56594 100644 --- a/demo/openapi.yaml +++ b/demo/openapi.yaml @@ -16,14 +16,14 @@ info: [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard - OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md). # OpenAPI Specification This API is documented in **OpenAPI format** and is based on [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard - OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md). # Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). diff --git a/demo/swagger.yaml b/demo/swagger.yaml index 9d629ad0..a7552d59 100644 --- a/demo/swagger.yaml +++ b/demo/swagger.yaml @@ -15,13 +15,13 @@ info: [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard - OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md). # OpenAPI Specification This API is documented in **OpenAPI format** and is based on [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard - OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md). # Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. diff --git a/docs/deployment/docker.md b/docs/deployment/docker.md index 5f11804f..09aaf520 100644 --- a/docs/deployment/docker.md +++ b/docs/deployment/docker.md @@ -37,5 +37,5 @@ docker run -p 8080:80 -e SPEC_URL=https://api.example.com/openapi.json redocly/r ## Create a Dockerfile You can also create a Dockerfile with some predefined environment variables. Check out -a sample [Dockerfile](https://github.com/Redocly/redoc/blob/master/config/docker/Dockerfile) +a sample [Dockerfile](https://github.com/Redocly/redoc/blob/main/config/docker/Dockerfile) in our code repo. diff --git a/src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap b/src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap index b676fc7e..4e7fea79 100644 --- a/src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap +++ b/src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap @@ -491,14 +491,14 @@ This API is documented in **OpenAPI format** and is based on [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard -OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). +OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md). # OpenAPI Specification This API is documented in **OpenAPI format** and is based on [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard -OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). +OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md). # Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). @@ -2440,14 +2440,14 @@ This API is documented in **OpenAPI format** and is based on [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard -OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). +OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md). # OpenAPI Specification This API is documented in **OpenAPI format** and is based on [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard -OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). +OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md). # Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). @@ -4224,13 +4224,13 @@ This API is documented in **OpenAPI format** and is based on [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard -OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). +OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md). # OpenAPI Specification This API is documented in **OpenAPI format** and is based on [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard -OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). +OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md). # Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser.