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

@@ -1,14 +1,14 @@
# Plugins
A plugin is a function that returns an object - more specifically, the object may contain functions and components that augment and modify Swagger-UI's functionality.
A plugin is a function that returns an object - more specifically, the object may contain functions and components that augment and modify Swagger UI's functionality.
### Note: Semantic Versioning
Swagger-UI's internal APIs are _not_ part of our public contract, which means that they can change without the major version changing.
Swagger UI's internal APIs are _not_ part of our public contract, which means that they can change without the major version changing.
If your custom plugins wrap, extend, override, or consume any internal core APIs, we recommend specifying a specific minor version of Swagger-UI to use in your application, because they will _not_ change between patch versions.
If your custom plugins wrap, extend, override, or consume any internal core APIs, we recommend specifying a specific minor version of Swagger UI to use in your application, because they will _not_ change between patch versions.
If you're installing Swagger-UI via NPM, for example, you can do this by using a tilde:
If you're installing Swagger UI via NPM, for example, you can do this by using a tilde:
```js
{
@@ -96,7 +96,7 @@ Once an action has been defined, you can use it anywhere that you can get a syst
system.exampleActions.updateFavoriteColor("blue")
```
The Action interface enables the creation of new Redux action creators within a piece of state in the Swagger-UI system.
The Action interface enables the creation of new Redux action creators within a piece of state in the Swagger UI system.
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.
@@ -225,7 +225,7 @@ A Wrap Action's first argument is `oriAction`, which is the action being wrapped
This mechanism is useful for conditionally overriding built-in behaviors, or listening to actions.
```javascript
// FYI: in an actual Swagger-UI, `updateSpec` is already defined in the core code
// FYI: in an actual Swagger UI, `updateSpec` is already defined in the core code
// it's just here for clarity on what's behind the scenes
const MySpecPlugin = function(system) {
return {
@@ -251,9 +251,9 @@ const MyWrapActionPlugin = function(system) {
spec: {
wrapActions: {
updateSpec: (oriAction, system) => (str) => {
// here, you can hand the value to some function that exists outside of Swagger-UI
// here, you can hand the value to some function that exists outside of Swagger UI
console.log("Here is my API definition", str)
return oriAction(str) // don't forget! otherwise, Swagger-UI won't update
return oriAction(str) // don't forget! otherwise, Swagger UI won't update
}
}
}
@@ -273,7 +273,7 @@ This interface is useful for controlling what data flows into components. We use
```javascript
import { createSelector } from 'reselect'
// FYI: in an actual Swagger-UI, the `url` spec selector is already defined
// FYI: in an actual Swagger UI, the `url` spec selector is already defined
// it's just here for clarity on what's behind the scenes
const MySpecPlugin = function(system) {
return {