Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some typos #1117

Merged
merged 1 commit into from
Dec 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $ yarn install # or npm
# dev-server, watch and auto reload playground
$ yarn start

# start playground app in production environement
# start playground app in production environment
$ yarn start:prod

# runt tslint
Expand Down Expand Up @@ -84,7 +84,7 @@ There are some other scripts available in the `scripts` section of the `package.

- **`src`**: contains the source code. The codebase is written in Typescript. CSS styles are managed with [Styled components](https://www.styled-components.com/). State is managed by [MobX](https://github.com/mobxjs/mobx)

- **`src/common-elements`**: containts common Styled elements or components used in multiple places
- **`src/common-elements`**: contains common Styled elements or components used in multiple places
- **`src/components`**: contains main visual components
- **`src/services`**: contains different services used by ReDoc including MobX stores
- **`src/services/models`**: contains classes for OpenAPI entities (e.g. Response, Operations, etc)
Expand Down
22 changes: 11 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* do not crash on empty scopes ([e787d9e](https://github.com/Redocly/redoc/commit/e787d9e)), closes [#1044](https://github.com/Redocly/redoc/issues/1044)
* false-positive recursive detection with allOf at the same level ([faa74d6](https://github.com/Redocly/redoc/commit/faa74d6))
* fix scrollYOffset when SSR ([21258a5](https://github.com/Redocly/redoc/commit/21258a5))
* left menu item before group is not highligted ([67e2a8f](https://github.com/Redocly/redoc/commit/67e2a8f)), closes [#1033](https://github.com/Redocly/redoc/issues/1033)
* left menu item before group is not highlighted ([67e2a8f](https://github.com/Redocly/redoc/commit/67e2a8f)), closes [#1033](https://github.com/Redocly/redoc/issues/1033)
* remove excessive whitespace between md sections on small screens ([e318fb3](https://github.com/Redocly/redoc/commit/e318fb3)), closes [#874](https://github.com/Redocly/redoc/issues/874)
* use url-template dependency ([#1008](https://github.com/Redocly/redoc/issues/1008)) ([32a464a](https://github.com/Redocly/redoc/commit/32a464a)), closes [#1007](https://github.com/Redocly/redoc/issues/1007)

Expand Down Expand Up @@ -97,7 +97,7 @@

* do not add extra slashes to pattern ([70d1ee9](https://github.com/Redocly/redoc/commit/70d1ee9)), closes [#983](https://github.com/Redocly/redoc/issues/983)
* dropdown fixes related to object description ([0504ad4](https://github.com/Redocly/redoc/commit/0504ad4))
* incorrect serialization of parameter sample with hypen ([f7dd658](https://github.com/Redocly/redoc/commit/f7dd658))
* incorrect serialization of parameter sample with hyphen ([f7dd658](https://github.com/Redocly/redoc/commit/f7dd658))
* redoc-cli: Add missing content type header on compressed responses of `/` path


Expand Down Expand Up @@ -171,7 +171,7 @@

### Bug Fixes

* broken schema talbes with long enums ([3a74b74](https://github.com/Rebilly/ReDoc/commit/3a74b74))
* broken schema tables with long enums ([3a74b74](https://github.com/Rebilly/ReDoc/commit/3a74b74))
* deep linking sometimes not working when sent over messengers ([2491d97](https://github.com/Rebilly/ReDoc/commit/2491d97))


Expand All @@ -189,7 +189,7 @@
* IE11 add missing fetch and URL polyfills ([d2ce1bd](https://github.com/Rebilly/ReDoc/commit/d2ce1bd)), closes [#875](https://github.com/Rebilly/ReDoc/issues/875)
* ignore empty x-tagGroups array ([#869](https://github.com/Rebilly/ReDoc/issues/869)) ([4366a0d](https://github.com/Rebilly/ReDoc/commit/4366a0d))
* incorrect detected schema title for deeply inherited schemas ([7d7b4e3](https://github.com/Rebilly/ReDoc/commit/7d7b4e3))
* pluralize arrray of types ([fdcac30](https://github.com/Rebilly/ReDoc/commit/fdcac30))
* pluralize array of types ([fdcac30](https://github.com/Rebilly/ReDoc/commit/fdcac30))
* remove huge space after Authentication section ([548fae3](https://github.com/Rebilly/ReDoc/commit/548fae3)), closes [#872](https://github.com/Rebilly/ReDoc/issues/872)
* remove query string from server URL ([#895](https://github.com/Rebilly/ReDoc/issues/895)) ([64453ff](https://github.com/Rebilly/ReDoc/commit/64453ff))
* remove tabs top margin ([5c187f3](https://github.com/Rebilly/ReDoc/commit/5c187f3))
Expand Down Expand Up @@ -273,7 +273,7 @@
* improve scrolling performance in Chrome with non-wrapped json examples ([a69c402](https://github.com/Rebilly/ReDoc/commit/a69c402))
* nested oneOf button spacing ([3673720](https://github.com/Rebilly/ReDoc/commit/3673720)), closes [#719](https://github.com/Rebilly/ReDoc/issues/719)
* onLoaded callback not run on spec error ([e77df0c](https://github.com/Rebilly/ReDoc/commit/e77df0c)), closes [#690](https://github.com/Rebilly/ReDoc/issues/690)
* theme improvments by [@stasiukanya](https://github.com/stasiukanya) ([e2d0cd5](https://github.com/Rebilly/ReDoc/commit/e2d0cd5))
* theme improvements by [@stasiukanya](https://github.com/stasiukanya) ([e2d0cd5](https://github.com/Rebilly/ReDoc/commit/e2d0cd5))
* **cli:** old peer dependency issue with styled-components ([#699](https://github.com/Rebilly/ReDoc/issues/699)) ([9e2853c](https://github.com/Rebilly/ReDoc/commit/9e2853c))


Expand Down Expand Up @@ -345,7 +345,7 @@

### Bug Fixes

* addd indent to array schema internals ([865f3ce](https://github.com/Rebilly/ReDoc/commit/865f3ce))
* add indent to array schema internals ([865f3ce](https://github.com/Rebilly/ReDoc/commit/865f3ce))
* fix oneOf/anyOf titles ([39b930d](https://github.com/Rebilly/ReDoc/commit/39b930d)), closes [#618](https://github.com/Rebilly/ReDoc/issues/618) [#621](https://github.com/Rebilly/ReDoc/issues/621)


Expand Down Expand Up @@ -391,7 +391,7 @@
### Bug Fixes

* add some spacing between operation description and parameters ([597688e](https://github.com/Rebilly/ReDoc/commit/597688e))
* description is not rendered if doesn't containt markdown headings ([90ed717](https://github.com/Rebilly/ReDoc/commit/90ed717)), closes [#591](https://github.com/Rebilly/ReDoc/issues/591)
* description is not rendered if doesn't contain markdown headings ([90ed717](https://github.com/Rebilly/ReDoc/commit/90ed717)), closes [#591](https://github.com/Rebilly/ReDoc/issues/591)
* download button downloads index.html instead of spec with CLI ([334f904](https://github.com/Rebilly/ReDoc/commit/334f904)), closes [#594](https://github.com/Rebilly/ReDoc/issues/594)
* fix Authentication section is not rendered ([2ecc8bc](https://github.com/Rebilly/ReDoc/commit/2ecc8bc)), closes [#590](https://github.com/Rebilly/ReDoc/issues/590)
* fix linebreaks in multiparagraph field descriptions ([8fb9cd6](https://github.com/Rebilly/ReDoc/commit/8fb9cd6))
Expand Down Expand Up @@ -702,7 +702,7 @@

### Bug Fixes

* Path parameters are not correctly overriden ([c406dc5](https://github.com/Rebilly/ReDoc/commit/c406dc5)), closes [#400](https://github.com/Rebilly/ReDoc/issues/400)
* Path parameters are not correctly overridden ([c406dc5](https://github.com/Rebilly/ReDoc/commit/c406dc5)), closes [#400](https://github.com/Rebilly/ReDoc/issues/400)
* Use parentNode instead of parentElement to fix IE11 crash ([e8adb60](https://github.com/Rebilly/ReDoc/commit/e8adb60)), closes [#406](https://github.com/Rebilly/ReDoc/issues/406)


Expand Down Expand Up @@ -864,7 +864,7 @@
* do not ignore path level parameters ([14f8408](https://github.com/Rebilly/Redoc/commit/14f8408))
* improve rendering of types ([17da7b7](https://github.com/Rebilly/Redoc/commit/17da7b7))
* move title propagation to the correct place ([0b0bc99](https://github.com/Rebilly/Redoc/commit/0b0bc99))
* owerwrite text-align to left ([bfee3ed](https://github.com/Rebilly/Redoc/commit/bfee3ed))
* overwrite text-align to left ([bfee3ed](https://github.com/Rebilly/Redoc/commit/bfee3ed))


### Features
Expand Down Expand Up @@ -926,7 +926,7 @@ Complete rewrite also means that this rewrite may introduce issues, but they sho

### Deprecations

- Fonts are not loaded by ReDoc so you should load them. Default fonts can be loaded as bellow:
- Fonts are not loaded by ReDoc so you should load them. Default fonts can be loaded as below:

```html
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
Expand Down Expand Up @@ -1295,7 +1295,7 @@ closes [#321](https://github.com/Rebilly/ReDoc/issues/321)
### Bug fixes
* Update webpack to the latest beta ([#143](https://github.com/Rebilly/ReDoc/issues/143))
* Fix read-only fields appear in request samples ([#142](https://github.com/Rebilly/ReDoc/issues/142))
* A few more minor UI improvemnts
* A few more minor UI improvements

### Features/Improvements
* Major performance optimization with new option `lazy-rendering`
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const configDir = './benchmark/revisions/config.js';
console.log(`Writing config "${configDir}"`);
fs.writeFileSync(configDir, configFile);

console.log('Starging benchmark server');
console.log('Starting benchmark server');
const proc = spawn('npm', ['run', 'start:benchmark']);

proc.stdout.on('data', data => {
Expand Down
2 changes: 1 addition & 1 deletion cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# To run:
# To display the command line options:
# $ docker run --rm -it redoc-cli --help
# .. will display the comand line help
# .. will display the command line help
#
# To turn `swagger.yml` file in the current directory, to html documentation 'redoc-static.html'
# $ docker run --rm -it -v $PWD:/data redoc-cli bundle swagger.yml
Expand Down
2 changes: 1 addition & 1 deletion config/docker/hooks/build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# DockerHub cd into Dockerfile location before buil
# DockerHub cd into Dockerfile location before build
# So we have to undo this.
cd ../..
docker build -f config/docker/Dockerfile -t $IMAGE_NAME .
22 changes: 11 additions & 11 deletions demo/big-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
{
"name": "Contacts",
"description": "Contacts are Customer's address book.\nAll contact information used in Invoices, Subscriptions, Transacions, etc is enlisted here. Hovewer, changing a Contact won't change corresponding contact information in related resources\n"
"description": "Contacts are Customer's address book.\nAll contact information used in Invoices, Subscriptions, Transacions, etc is enlisted here. However, changing a Contact won't change corresponding contact information in related resources\n"
},
{
"name": "Coupons",
Expand Down Expand Up @@ -93,7 +93,7 @@
},
{
"name": "Files",
"description": "A File is an entity that can store a phyiscal file and some metadata. It also provides an easy access to\nits size, mime-type, user-defined tags and description thus allowing easy sorting and searching among stored\nfiles.\nThere are several methods of file uploading available: multipart/form-data encoded form, RAW POST (by sending\nfile contents as POST body), fetching from URL (by providing the file URL via 'url' param)\nAttachment is an entity that is used to link a File to one or multiple objects like Customer, Dispute, Payment,\nTransaction, Subscription, Plan, Product, Invoice, Note. That allows to quickly find and use files related to\nthose specific entities.\n"
"description": "A File is an entity that can store a physical file and some metadata. It also provides an easy access to\nits size, mime-type, user-defined tags and description thus allowing easy sorting and searching among stored\nfiles.\nThere are several methods of file uploading available: multipart/form-data encoded form, RAW POST (by sending\nfile contents as POST body), fetching from URL (by providing the file URL via 'url' param)\nAttachment is an entity that is used to link a File to one or multiple objects like Customer, Dispute, Payment,\nTransaction, Subscription, Plan, Product, Invoice, Note. That allows to quickly find and use files related to\nthose specific entities.\n"
},
{
"name": "Gateway Accounts",
Expand Down Expand Up @@ -15623,7 +15623,7 @@
"description": "Reset user password\n",
"responses": {
"201": {
"description": "Password was reseted successfully",
"description": "Password was reset successfully",
"headers": {
"Rate-Limit-Limit": {
"description": "The number of allowed requests in the current period",
Expand Down Expand Up @@ -23851,17 +23851,17 @@
"type": "string"
},
"totpRequired": {
"description": "The user setting of two-factor authentification",
"description": "The user setting of two-factor authentication",
"readOnly": true,
"type": "boolean"
},
"totpSecret": {
"description": "The user TOTP key for authentification app (if TOTP enabled)",
"description": "The user TOTP key for authentication app (if TOTP enabled)",
"readOnly": true,
"type": "string"
},
"totpUrl": {
"description": "The user link to QR-code for TOTP authentification app (if TOTP enabled)",
"description": "The user link to QR-code for TOTP authentication app (if TOTP enabled)",
"readOnly": true,
"type": "string",
"format": "url"
Expand Down Expand Up @@ -24250,7 +24250,7 @@
},
"bodyHtml": {
"type": "string",
"description": "Leave empty to recieve \"text/plain\" email.\nThe template palceholders are allowed.\n"
"description": "Leave empty to receive \"text/plain\" email.\nThe template palceholders are allowed.\n"
}
},
"required": [
Expand Down Expand Up @@ -26495,15 +26495,15 @@
}
},
"totpRequired": {
"description": "The user setting of two-factor authentification",
"description": "The user setting of two-factor authentication",
"type": "boolean"
},
"totpSecret": {
"description": "The user TOTP key for authentification app (if TOTP enabled)",
"description": "The user TOTP key for authentication app (if TOTP enabled)",
"type": "string"
},
"totpUrl": {
"description": "The user link to QR-code for TOTP authentification app (if TOTP enabled)",
"description": "The user link to QR-code for TOTP authentication app (if TOTP enabled)",
"type": "string",
"format": "url"
},
Expand Down Expand Up @@ -26984,7 +26984,7 @@
"collectionExpand": {
"name": "expand",
"in": "query",
"description": "Expand response to get full related object intead of ID. See the expand guide for more info.",
"description": "Expand response to get full related object instead of ID. See the expand guide for more info.",
"schema": {
"type": "string"
}
Expand Down
8 changes: 4 additions & 4 deletions demo/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ paths:
tags:
- pet
summary: Finds Pets by status
description: Multiple status values can be provided with comma seperated strings
description: Multiple status values can be provided with comma separated strings
operationId: findPetsByStatus
parameters:
- name: status
Expand Down Expand Up @@ -351,7 +351,7 @@ paths:
- pet
summary: Finds Pets by tags
description: >-
Muliple tags can be provided with comma seperated strings. Use tag1,
Multiple tags can be provided with comma separated strings. Use tag1,
tag2, tag3 for testing.
operationId: findPetsByTags
deprecated: true
Expand Down Expand Up @@ -631,7 +631,7 @@ paths:
type: integer
format: int32
X-Expires-After:
description: date in UTC when toekn expires
description: date in UTC when token expires
schema:
type: string
format: date-time
Expand Down Expand Up @@ -776,7 +776,7 @@ components:
type: boolean
default: false
readOnly: true
rqeuestId:
requestId:
description: Unique Request Id
type: string
writeOnly: true
Expand Down
2 changes: 1 addition & 1 deletion demo/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ paths:
X-Expires-After:
type: string
format: date-time
description: date in UTC when toekn expires
description: date in UTC when token expires
'400':
description: Invalid username/password supplied
/user/logout:
Expand Down
2 changes: 1 addition & 1 deletion src/components/Markdown/AdvancedMarkdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class AdvancedMarkdown extends React.Component<AdvancedMarkdownProps> {
renderWithOptionsAndStore(options: RedocNormalizedOptions, store?: AppStore) {
const { source, htmlWrap = i => i } = this.props;
if (!store) {
throw new Error('When using componentes in markdown, store prop must be provided');
throw new Error('When using components in markdown, store prop must be provided');
}

const renderer = new MarkdownRenderer(options);
Expand Down
6 changes: 3 additions & 3 deletions src/components/__tests__/JsonViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ describe('Components', () => {
});

test('should collapse/uncollapse', () => {
expect(component.html()).not.toContain('class="hoverable"'); // all are collapesed by default
expect(component.html()).not.toContain('class="hoverable"'); // all are collapsed by default
const expandAll = component.find('div > span[children=" Expand all "]');
expandAll.simulate('click');
expect(component.html()).toContain('class="hoverable"'); // all are collapesed
expect(component.html()).toContain('class="hoverable"'); // all are collapsed

const collapseAll = component.find('div > span[children=" Collapse all "]');
collapseAll.simulate('click');
expect(component.html()).not.toContain('class="hoverable"'); // all are collapesed
expect(component.html()).not.toContain('class="hoverable"'); // all are collapsed
});

test('should collapse/uncollapse', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/services/MenuBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class MenuBuilder {
}

/**
* Returns array of OperationsGroup items for the tag groups (x-tagGroups vendor extenstion)
* Returns array of OperationsGroup items for the tag groups (x-tagGroups vendor extension)
* @param tags value of `x-tagGroups` vendor extension
*/
static getTagGroupsItems(
Expand Down
2 changes: 1 addition & 1 deletion src/services/MenuStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export class MenuStore {
* activate menu item
* @param item item to activate
* @param updateLocation [true] whether to update location
* @param rewriteHistory [false] whether to rewrite browser history (do not create new enrty)
* @param rewriteHistory [false] whether to rewrite browser history (do not create new entry)
*/
@action
activate(
Expand Down
14 changes: 7 additions & 7 deletions src/services/OpenAPIParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class OpenAPIParser {
};

/**
* checks if the objectt is OpenAPI reference (containts $ref property)
* checks if the object is OpenAPI reference (contains $ref property)
*/
isRef(obj: any): obj is OpenAPIRef {
if (!obj) {
Expand All @@ -122,7 +122,7 @@ export class OpenAPIParser {
}

/**
* resets visited enpoints. should be run after
* resets visited endpoints. should be run after
*/
resetVisited() {
if (process.env.NODE_ENV !== 'production') {
Expand All @@ -146,7 +146,7 @@ export class OpenAPIParser {
/**
* Resolve given reference object or return as is if it is not a reference
* @param obj object to dereference
* @param forceCircular whether to dereference even if it is cirular ref
* @param forceCircular whether to dereference even if it is circular ref
*/
deref<T extends object>(obj: OpenAPIRef | T, forceCircular: boolean = false): T {
if (this.isRef(obj)) {
Expand Down Expand Up @@ -177,10 +177,10 @@ export class OpenAPIParser {
}

/**
* Merge allOf contsraints.
* Merge allOf constraints.
* @param schema schema with allOF
* @param $ref pointer of the schema
* @param forceCircular whether to dereference children even if it is a cirular ref
* @param forceCircular whether to dereference children even if it is a circular ref
*/
mergeAllOf(
schema: OpenAPISchema,
Expand Down Expand Up @@ -275,13 +275,13 @@ export class OpenAPIParser {
}

// merge rest of constraints
// TODO: do more intelegent merge
// TODO: do more intelligent merge
receiver = { ...subSchema, ...receiver };

if (subSchemaRef) {
receiver.parentRefs!.push(subSchemaRef);
if (receiver.title === undefined && isNamedDefinition(subSchemaRef)) {
// this is not so correct behaviour. comented out for now
// this is not so correct behaviour. commented out for now
// ref: https://github.com/Redocly/redoc/issues/601
// receiver.title = JsonPointer.baseName(subSchemaRef);
}
Expand Down
Loading