docs: fix typos and update https references (#8154)
Co-authored-by: Tim Lai <timothy.lai@smartbear.com>
This commit is contained in:
committed by
GitHub
parent
7e65155a7b
commit
9891d97201
@@ -7,7 +7,7 @@ Swagger UI leans heavily on concepts and patterns found in React and Redux.
|
|||||||
If you aren't already familiar, here's some suggested reading:
|
If you aren't already familiar, here's some suggested reading:
|
||||||
|
|
||||||
- [React: Quick Start (reactjs.org)](https://reactjs.org/docs/hello-world.html)
|
- [React: Quick Start (reactjs.org)](https://reactjs.org/docs/hello-world.html)
|
||||||
- [Redux README (redux.js.org)](http://redux.js.org/)
|
- [Redux README (redux.js.org)](https://redux.js.org/)
|
||||||
|
|
||||||
In the following documentation, we won't take the time to define the fundamentals covered in the resources above.
|
In the following documentation, we won't take the time to define the fundamentals covered in the resources above.
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ The Action interface enables the creation of new Redux action creators within a
|
|||||||
|
|
||||||
This action creator function will be exposed to container components as `exampleActions.updateFavoriteColor`. When this action creator is called, the return value (which should be a [Flux Standard Action](https://github.com/acdlite/flux-standard-action)) will be passed to the `example` reducer, which we'll define in the next section.
|
This action creator function will be exposed to container components as `exampleActions.updateFavoriteColor`. When this action creator is called, the return value (which should be a [Flux Standard Action](https://github.com/acdlite/flux-standard-action)) will be passed to the `example` reducer, which we'll define in the next section.
|
||||||
|
|
||||||
For more information about the concept of actions in Redux, see the [Redux Actions documentation](http://redux.js.org/docs/basics/Actions.html).
|
For more information about the concept of actions in Redux, see the [Redux Actions documentation](https://redux.js.org/tutorials/fundamentals/part-2-concepts-data-flow#actions).
|
||||||
|
|
||||||
#### Reducers
|
#### Reducers
|
||||||
|
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ Example:
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
SUPPORTED_SUBMIT_METHODS="[\"get\", \"post\"]"
|
SUPPORTED_SUBMIT_METHODS="[\"get\", \"post\"]"
|
||||||
URLS="[ { url: \"http://petstore.swagger.io/v2/swagger.json\", name: \"Petstore\" } ]"
|
URLS="[ { url: \"https://petstore.swagger.io/v2/swagger.json\", name: \"Petstore\" } ]"
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Object variables
|
##### Object variables
|
||||||
@@ -387,5 +387,5 @@ SPEC="{ \"openapi\": \"3.0.0\" }"
|
|||||||
#### .env file example encoding
|
#### .env file example encoding
|
||||||
```sh
|
```sh
|
||||||
SUPPORTED_SUBMIT_METHODS=['get', 'post']
|
SUPPORTED_SUBMIT_METHODS=['get', 'post']
|
||||||
URLS=[ { url: 'http://petstore.swagger.io/v2/swagger.json', name: 'Petstore' } ]
|
URLS=[ { url: 'https://petstore.swagger.io/v2/swagger.json', name: 'Petstore' } ]
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -41,11 +41,11 @@ XMLHttpRequest cannot load http://sad.server.com/v2/api-docs. No 'Access-Control
|
|||||||
|
|
||||||
Swagger UI cannot easily show this error state.
|
Swagger UI cannot easily show this error state.
|
||||||
|
|
||||||
- Use the http://www.test-cors.org website to verify CORS support. Keep in mind this will show a successful result even if `Access-Control-Allow-Headers` is not available, which is still required for Swagger UI to function properly.
|
- Use the https://www.test-cors.org website to verify CORS support. Keep in mind this will show a successful result even if `Access-Control-Allow-Headers` is not available, which is still required for Swagger UI to function properly.
|
||||||
|
|
||||||
### Enabling CORS
|
### Enabling CORS
|
||||||
|
|
||||||
The method of enabling CORS depends on the server and/or framework you use to host your application. http://enable-cors.org provides information on how to enable CORS in some common web servers.
|
The method of enabling CORS depends on the server and/or framework you use to host your application. https://enable-cors.org provides information on how to enable CORS in some common web servers.
|
||||||
|
|
||||||
Other servers/frameworks may provide you information on how to enable it specifically in their use case.
|
Other servers/frameworks may provide you information on how to enable it specifically in their use case.
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ If you've determined this is the version you have, to find the exact version:
|
|||||||
/**
|
/**
|
||||||
* swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
|
* swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
|
||||||
* @version v2.2.9
|
* @version v2.2.9
|
||||||
* @link http://swagger.io
|
* @link https://swagger.io
|
||||||
* @license Apache-2.0
|
* @license Apache-2.0
|
||||||
*/
|
*/
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export default class ObjectModel extends Component {
|
|||||||
true
|
true
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
!(properties && properties.size) ? null : properties.entrySeq().filter(
|
!(properties && properties.size) ? null : properties.entrySeq().filter(
|
||||||
@@ -143,7 +143,7 @@ export default class ObjectModel extends Component {
|
|||||||
}).toArray()
|
}).toArray()
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
// empty row befor extensions...
|
// empty row before extensions...
|
||||||
!showExtensions ? null : <tr><td> </td></tr>
|
!showExtensions ? null : <tr><td> </td></tr>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export function isOAS3(jsSpec) {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// we gate against `3.1` becasue we want to explicitly opt into supporting it
|
// we gate against `3.1` because we want to explicitly opt into supporting it
|
||||||
// at some point in the future -- KS, 7/2018
|
// at some point in the future -- KS, 7/2018
|
||||||
|
|
||||||
// starts with, but is not `3.0.` exactly
|
// starts with, but is not `3.0.` exactly
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export function SomePlugin(toolbox) {
|
|||||||
getState => getState(), // This is a requirement... because we `bind` selectors, we don't want to bind to any particular state (which is an immutable value) so we bind to a function, which returns the current state
|
getState => getState(), // This is a requirement... because we `bind` selectors, we don't want to bind to any particular state (which is an immutable value) so we bind to a function, which returns the current state
|
||||||
state => state.get("something") // return the whatever "something" points to
|
state => state.get("something") // return the whatever "something" points to
|
||||||
),
|
),
|
||||||
foo: getState => "bar" // In the end selectors are just fuctions that we pass getState to
|
foo: getState => "bar" // In the end selectors are just functions that we pass getState to
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: basicName
|
name: basicName
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
@@ -21,4 +21,4 @@ paths:
|
|||||||
- type: integer
|
- type: integer
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successfull fetch
|
description: successful fetch
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
const expectedValue = "nullable: true"
|
const expectedValue = "nullable: true"
|
||||||
|
|
||||||
describe("#5660: Nullable object", () => {
|
describe("#5660: Nullable object", () => {
|
||||||
it("should render `nullable` marker for object ifself", () => {
|
it("should render `nullable` marker for object itself", () => {
|
||||||
cy.visit("/?url=/documents/bugs/5660-model.yaml")
|
cy.visit("/?url=/documents/bugs/5660-model.yaml")
|
||||||
.get("#model-SomeObject .model-toggle")
|
.get("#model-SomeObject .model-toggle")
|
||||||
.click()
|
.click()
|
||||||
.get("#model-SomeObject > .model-box")
|
.get("#model-SomeObject > .model-box")
|
||||||
.contains(expectedValue)
|
.contains(expectedValue)
|
||||||
})
|
})
|
||||||
it("should render `nullable` marker for nexted object in property", () => {
|
it("should render `nullable` marker for next object in property", () => {
|
||||||
cy.visit("/?url=/documents/bugs/5660-property.yaml")
|
cy.visit("/?url=/documents/bugs/5660-property.yaml")
|
||||||
.get("#model-SomeObject .model-toggle")
|
.get("#model-SomeObject .model-toggle")
|
||||||
.click()
|
.click()
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ describe("OpenAPI 3.0 Multiple Servers", () => {
|
|||||||
.get(".responses-wrapper .request-url")
|
.get(".responses-wrapper .request-url")
|
||||||
.should("contains.text", "/test-url-1")
|
.should("contains.text", "/test-url-1")
|
||||||
})
|
})
|
||||||
it("should render and execute for server '/test-url-switch-1' after changing api defintion", () => {
|
it("should render and execute for server '/test-url-switch-1' after changing api definition", () => {
|
||||||
cy.visit(
|
cy.visit(
|
||||||
"/?url=/documents/features/oas3-multiple-servers.yaml"
|
"/?url=/documents/features/oas3-multiple-servers.yaml"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ describe("OAS3 Request Body user edit flows", () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
describe("multipart/", () => {
|
describe("multipart/", () => {
|
||||||
// Case: User wants to execute operation with media-type multipart/ with a enum property. The user expects the first enum value to be used when execuded.
|
// Case: User wants to execute operation with media-type multipart/ with a enum property. The user expects the first enum value to be used when executed.
|
||||||
it("should use the first enum value on execute if not changed by user (#6976)", () => {
|
it("should use the first enum value on execute if not changed by user (#6976)", () => {
|
||||||
// test/e2e-cypress/static/documents/features/request-body/multipart/enum.yaml
|
// test/e2e-cypress/static/documents/features/request-body/multipart/enum.yaml
|
||||||
getExpandedTryout(
|
getExpandedTryout(
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ describe("OpenAPI 3.0 Additional JsonSchemaForm in a Parameter", () => {
|
|||||||
.get(".request-url pre.microlight")
|
.get(".request-url pre.microlight")
|
||||||
.should("contain.text", "available")
|
.should("contain.text", "available")
|
||||||
})
|
})
|
||||||
it("should render the operation, modify value, and execute with modfied value", () => {
|
it("should render the operation, modify value, and execute with modified value", () => {
|
||||||
cy.visit("/?url=/documents/features/schema-form-core.yaml")
|
cy.visit("/?url=/documents/features/schema-form-core.yaml")
|
||||||
.get("#operations-default-findPetsByStatus")
|
.get("#operations-default-findPetsByStatus")
|
||||||
.click()
|
.click()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
describe("Try It Out: schema required properties can be overriden", () => {
|
describe("Try It Out: schema required properties can be overridden", () => {
|
||||||
it("should execute", () => {
|
it("should execute", () => {
|
||||||
cy
|
cy
|
||||||
.visit("?tryItOutEnabled=true&url=/documents/features/try-it-out-schema-required-override-allowed.yaml")
|
.visit("?tryItOutEnabled=true&url=/documents/features/try-it-out-schema-required-override-allowed.yaml")
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ describe("feature: OpenAPI 3 allowEmptyValue", function () {
|
|||||||
.to.contain(`GET "http://localhost:3230/emptyValueParams"`)
|
.to.contain(`GET "http://localhost:3230/emptyValueParams"`)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
describe("send empty inital value behavior", function () {
|
describe("send empty initial value behavior", function () {
|
||||||
it("should send an empty integer value", function (client) {
|
it("should send an empty integer value", function (client) {
|
||||||
const paramSelector = `tr[data-param-name="int"]`
|
const paramSelector = `tr[data-param-name="int"]`
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ components:
|
|||||||
description: a human readable message explaining the error
|
description: a human readable message explaining the error
|
||||||
type: string
|
type: string
|
||||||
reason:
|
reason:
|
||||||
description: a functionnal key about the error
|
description: a functional key about the error
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
Unauthorized:
|
Unauthorized:
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
openapi: 3.0.0
|
openapi: 3.0.0
|
||||||
info:
|
info:
|
||||||
description: |
|
description: |
|
||||||
This is a test to show how model refererence from another file are failing.
|
This is a test to show how model reference from another file fails.
|
||||||
This file references api2.yaml. If you load this file first in the browser it fails.
|
This file references api2.yaml. If you load this file first in the browser it fails.
|
||||||
However, if you load api2.yaml first, then load this one it will work.
|
However, if you load api2.yaml first, then load this one it will work.
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: API1 Test
|
title: API1 Test
|
||||||
paths:
|
paths:
|
||||||
'/test-api-1':
|
'/test-api-1':
|
||||||
get:
|
get:
|
||||||
summary: Api 1
|
summary: Api 1
|
||||||
responses:
|
responses:
|
||||||
@@ -29,4 +29,4 @@ components:
|
|||||||
api1prop:
|
api1prop:
|
||||||
$ref: '#/components/schemas/Api1Prop'
|
$ref: '#/components/schemas/Api1Prop'
|
||||||
api2prop:
|
api2prop:
|
||||||
$ref: 'api2.yaml#/components/schemas/Api2Prop'
|
$ref: 'api2.yaml#/components/schemas/Api2Prop'
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
openapi: 3.0.0
|
openapi: 3.0.0
|
||||||
info:
|
info:
|
||||||
description: |
|
description: |
|
||||||
This is a test to show how model refererence from another file are failing.
|
This is a test to show how model reference from another file fails.
|
||||||
This file is referenced api1.yaml. If you load api1.yaml first in the browser it fails.
|
This file is referenced api1.yaml. If you load api1.yaml first in the browser it fails.
|
||||||
However, if you load this file first, then load api1.yaml it will work.
|
However, if you load this file first, then load api1.yaml it will work.
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: API2 Test
|
title: API2 Test
|
||||||
paths:
|
paths:
|
||||||
'/test-api-2':
|
'/test-api-2':
|
||||||
get:
|
get:
|
||||||
summary: Api 2
|
summary: Api 2
|
||||||
responses:
|
responses:
|
||||||
@@ -29,4 +29,4 @@ components:
|
|||||||
description: This is a test prop
|
description: This is a test prop
|
||||||
properties:
|
properties:
|
||||||
api2prop:
|
api2prop:
|
||||||
$ref: '#/components/schemas/Api2Prop'
|
$ref: '#/components/schemas/Api2Prop'
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ describe("curlify", function () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe("POST when header value is 'multipart/form-data' but header name is not 'content-type'", function () {
|
describe("POST when header value is 'multipart/form-data' but header name is not 'content-type'", function () {
|
||||||
it("shoud print a proper curl as -d <data>, when file type is provided", function () {
|
it("should print a proper curl as -d <data>, when file type is provided", function () {
|
||||||
let file = new win.File([""], "file.txt", { type: "text/plain" })
|
let file = new win.File([""], "file.txt", { type: "text/plain" })
|
||||||
// file.name = "file.txt"
|
// file.name = "file.txt"
|
||||||
// file.type = "text/plain"
|
// file.type = "text/plain"
|
||||||
@@ -340,7 +340,7 @@ describe("curlify", function () {
|
|||||||
expect(curlified).toEqual("curl -X 'POST' \\\n 'http://example.com' \\\n -H 'x-custom-name: multipart/form-data' \\\n -d '{\n \"id\": \"123\",\n \"file\": {\n \"name\": \"file.txt\",\n \"type\": \"text/plain\"\n }\n}'")
|
expect(curlified).toEqual("curl -X 'POST' \\\n 'http://example.com' \\\n -H 'x-custom-name: multipart/form-data' \\\n -d '{\n \"id\": \"123\",\n \"file\": {\n \"name\": \"file.txt\",\n \"type\": \"text/plain\"\n }\n}'")
|
||||||
})
|
})
|
||||||
|
|
||||||
it("shoud print a proper curl as -d <data>, no file type provided", function () {
|
it("should print a proper curl as -d <data>, no file type provided", function () {
|
||||||
let file = new win.File([""], "file.txt")
|
let file = new win.File([""], "file.txt")
|
||||||
// file.name = "file.txt"
|
// file.name = "file.txt"
|
||||||
// file.type = "text/plain"
|
// file.type = "text/plain"
|
||||||
|
|||||||
Reference in New Issue
Block a user