You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/customization/custom-layout.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Creating a custom layout
2
2
3
-
**Layouts** are a special type of component that Swagger-UI uses as the root component for the entire application. You can define custom layouts in order to have high-level control over what ends up on the page.
3
+
**Layouts** are a special type of component that SwaggerUI uses as the root component for the entire application. You can define custom layouts in order to have high-level control over what ends up on the page.
4
4
5
-
By default, Swagger-UI uses `BaseLayout`, which is built into the application. You can specify a different layout to be used by passing the layout's name as the `layout` parameter to Swagger-UI. Be sure to provide your custom layout as a component to Swagger-UI.
5
+
By default, SwaggerUI uses `BaseLayout`, which is built into the application. You can specify a different layout to be used by passing the layout's name as the `layout` parameter to SwaggerUI. Be sure to provide your custom layout as a component to SwaggerUI.
Copy file name to clipboardexpand all lines: docs/customization/overview.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
### Prior art
4
4
5
-
Swagger-UI leans heavily on concepts and patterns found in React and Redux.
5
+
SwaggerUI leans heavily on concepts and patterns found in React and Redux.
6
6
7
7
If you aren't already familiar, here's some suggested reading:
8
8
@@ -17,7 +17,7 @@ In the following documentation, we won't take the time to define the fundamental
17
17
18
18
### The System
19
19
20
-
The _system_ is the heart of the Swagger-UI application. At runtime, it's a JavaScript object that holds many things:
20
+
The _system_ is the heart of the SwaggerUI application. At runtime, it's a JavaScript object that holds many things:
21
21
22
22
- React components
23
23
- Bound Redux actions and reducers
@@ -27,11 +27,11 @@ The _system_ is the heart of the Swagger-UI application. At runtime, it's a Java
27
27
- References to the React and Immutable.js libraries (`system.React`, `system.Im`)
28
28
- User-defined helper functions
29
29
30
-
The system is built up when Swagger-UI is called by iterating through ("compiling") each plugin that Swagger-UI has been given, through the `presets` and `plugins` configuration options.
30
+
The system is built up when SwaggerUI is called by iterating through ("compiling") each plugin that SwaggerUI has been given, through the `presets` and `plugins` configuration options.
31
31
32
32
### Presets
33
33
34
-
Presets are arrays of plugins, which are provided to Swagger-UI through the `presets` configuration option. All plugins within presets are compiled before any plugins provided via the `plugins` configuration option. Consider the following example:
34
+
Presets are arrays of plugins, which are provided to SwaggerUI through the `presets` configuration option. All plugins within presets are compiled before any plugins provided via the `plugins` configuration option. Consider the following example:
By default, Swagger-UI includes the internal `ApisPreset`, which contains a set of plugins that provide baseline functionality for Swagger-UI. If you specify your own `presets` option, you need to add the ApisPreset manually, like so:
46
+
By default, SwaggerUI includes the internal `ApisPreset`, which contains a set of plugins that provide baseline functionality for SwaggerUI. If you specify your own `presets` option, you need to add the ApisPreset manually, like so:
47
47
48
48
```javascript
49
49
SwaggerUI({
@@ -54,15 +54,15 @@ SwaggerUI({
54
54
})
55
55
```
56
56
57
-
The need to provide the `apis` preset when adding other presets is an artifact of Swagger-UI's original design, and will likely be removed in the next major version.
57
+
The need to provide the `apis` preset when adding other presets is an artifact of SwaggerUI's original design, and will likely be removed in the next major version.
58
58
59
59
### getComponent
60
60
61
61
`getComponent` is a helper function injected into every container component, which is used to get references to components provided by the plugin system.
62
62
63
63
All components should be loaded through `getComponent`, since it allows other plugins to modify the component. It is preferred over a conventional `import` statement.
64
64
65
-
Container components in Swagger-UI can be loaded by passing `true` as the second argument to `getComponent`, like so:
65
+
Container components in SwaggerUI can be loaded by passing `true` as the second argument to `getComponent`, like so:
Copy file name to clipboardexpand all lines: docs/customization/plug-points.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
# Plug points
2
2
3
-
Swagger-UI exposes most of its internal logic through the plugin system.
3
+
SwaggerUI exposes most of its internal logic through the plugin system.
4
4
5
5
Often, it is beneficial to override the core internals to achieve custom behavior.
6
6
7
7
### Note: Semantic Versioning
8
8
9
-
Swagger-UI's internal APIs are _not_ part of our public contract, which means that they can change without the major version changing.
9
+
SwaggerUI's internal APIs are _not_ part of our public contract, which means that they can change without the major version changing.
10
10
11
-
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.
11
+
If your custom plugins wrap, extend, override, or consume any internal core APIs, we recommend specifying a specific minor version of SwaggerUI to use in your application, because they will _not_ change between patch versions.
12
12
13
-
If you're installing Swagger-UI via NPM, for example, you can do this by using a tilde:
13
+
If you're installing SwaggerUI via NPM, for example, you can do this by using a tilde:
Copy file name to clipboardexpand all lines: docs/customization/plugin-api.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# Plugins
2
2
3
-
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.
3
+
A plugin is a function that returns an object - more specifically, the object may contain functions and components that augment and modify SwaggerUI's functionality.
4
4
5
5
### Note: Semantic Versioning
6
6
7
-
Swagger-UI's internal APIs are _not_ part of our public contract, which means that they can change without the major version changing.
7
+
SwaggerUI's internal APIs are _not_ part of our public contract, which means that they can change without the major version changing.
8
8
9
-
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.
9
+
If your custom plugins wrap, extend, override, or consume any internal core APIs, we recommend specifying a specific minor version of SwaggerUI to use in your application, because they will _not_ change between patch versions.
10
10
11
-
If you're installing Swagger-UI via NPM, for example, you can do this by using a tilde:
11
+
If you're installing SwaggerUI via NPM, for example, you can do this by using a tilde:
12
12
13
13
```js
14
14
{
@@ -96,7 +96,7 @@ Once an action has been defined, you can use it anywhere that you can get a syst
96
96
system.exampleActions.updateFavoriteColor("blue")
97
97
```
98
98
99
-
The Action interface enables the creation of new Redux action creators within a piece of state in the Swagger-UI system.
99
+
The Action interface enables the creation of new Redux action creators within a piece of state in the SwaggerUI system.
100
100
101
101
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.
102
102
@@ -225,7 +225,7 @@ A Wrap Action's first argument is `oriAction`, which is the action being wrapped
225
225
This mechanism is useful for conditionally overriding built-in behaviors, or listening to actions.
226
226
227
227
```javascript
228
-
// FYI: in an actual Swagger-UI, `updateSpec` is already defined in the core code
228
+
// FYI: in an actual SwaggerUI, `updateSpec` is already defined in the core code
229
229
// it's just here for clarity on what's behind the scenes
Copy file name to clipboardexpand all lines: docs/development/setting-up.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Setting up a dev environment
2
2
3
-
Swagger-UI includes a development server that provides hot module reloading and unminified stack traces, for easier development.
3
+
SwaggerUI includes a development server that provides hot module reloading and unminified stack traces, for easier development.
4
4
5
5
### Prerequisites
6
6
@@ -20,5 +20,5 @@ Swagger-UI includes a development server that provides hot module reloading and
20
20
21
21
## Bonus points
22
22
23
-
- Swagger-UI includes an ESLint rule definition. If you use a graphical editor, consider installing an ESLint plugin, which will point out syntax and style errors for you as you code.
23
+
- SwaggerUI includes an ESLint rule definition. If you use a graphical editor, consider installing an ESLint plugin, which will point out syntax and style errors for you as you code.
24
24
- The linter runs as part of the PR test sequence, so don't think you can get away with not paying attention to it!
0 commit comments