Change Swagger-UI -> Swagger UI in docs (#5479)

* Change Swagger-UI -> Swagger UI in docs

* Changed back to SwaggerUI in places that refer to JS construct
This commit is contained in:
Helen Kosova
2019-07-19 18:22:45 +03:00
committed by Ron
parent be5e057bfa
commit 8822a7229a
15 changed files with 77 additions and 77 deletions

View File

@@ -6,7 +6,7 @@ You can read about CORS here: http://www.w3.org/TR/cors.
There are two cases where no action is needed for CORS support:
1. swagger-ui is hosted on the same server as the application itself (same host *and* port).
1. Swagger UI is hosted on the same server as the application itself (same host *and* port).
2. The application is located behind a proxy that enables the required CORS headers. This may already be covered within your organization.
Otherwise, CORS support needs to be enabled for:
@@ -33,15 +33,15 @@ Content-Length: 0
This tells us that the petstore resource listing supports OPTIONS, and the following headers: `Content-Type`, `api_key`, `Authorization`.
- Try swagger-ui from your file system and look at the debug console. If CORS is not enabled, you'll see something like this:
- Try Swagger UI from your file system and look at the debug console. If CORS is not enabled, you'll see something like this:
```
XMLHttpRequest cannot load http://sad.server.com/v2/api-docs. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
```
Swagger-UI cannot easily show this error state.
Swagger UI cannot easily show this error state.
- Using the http://www.test-cors.org website. 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.
- Using the http://www.test-cors.org website. 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
@@ -51,10 +51,10 @@ Other servers/frameworks may provide you information on how to enable it specifi
### CORS and Header Parameters
Swagger lets you easily send headers as parameters to requests. The name of these headers *MUST* be supported in your CORS configuration as well. From our example above:
Swagger UI lets you easily send headers as parameters to requests. The name of these headers *MUST* be supported in your CORS configuration as well. From our example above:
```
Access-Control-Allow-Headers: Content-Type, api_key, Authorization
```
Only headers with these names will be allowed to be sent by Swagger-UI.
Only headers with these names will be allowed to be sent by Swagger UI.