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
{{ message }}
This repository was archived by the owner on Sep 14, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: docs/adding-paths.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ The parts of the path definition include:
51
51
52
52
* `parameters:` specifies any parameters used by the path. They can be passed as query or form parameters, or headers.
53
53
54
-
* The other keys conform to the Swagger 2.0 [specifications](https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md). The parameters is a YAML array that defines all the parameters required for the call. The responses object defines the response specifications for response codes.
54
+
* The other keys conform to the Swagger 2.0 [specifications](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md). The parameters is a YAML array that defines all the parameters required for the call. The responses object defines the response specifications for response codes.
55
55
56
56
### <a name="more"></a>More about route handling
57
57
@@ -93,7 +93,7 @@ When you call your API, the middleware attempts to match a route defined in the
93
93
94
94
### <a name="models"></a>Request and response models
95
95
96
-
The Swagger specification allows you to define both request and the response models (also called schemas). The `path` definition described in the previous section is an example of a request model.
96
+
The OpenAPI Specification allows you to define both request and the response models (also called schemas). The `path` definition described in the previous section is an example of a request model.
97
97
98
98
Here's an example of a weather API that returns a relatively complex object.
Copy file name to clipboardExpand all lines: docs/introduction.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ The swagger module provides tools for designing and building APIs entirely in No
7
7
### <aname="sdlc"></a>The API-First Development Process
8
8
API design is a discovery process. Swagger development begins with design tooling, and it expects that you will evolve your interface over time. It gracefully handles the routing of interfaces to controllers so that you can make changes to your interfaces without clobbering any of your implementation logic.
9
9
10
-
Designing an API specification is like writing a contract. As you write the spec in YAML using [Swagger 2.0](https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md), your API documentation is generated in real-time, allowing the client and server teams to agree on how their systems will work together.
10
+
Designing an API specification is like writing a contract. As you write the spec in YAML using [Swagger 2.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md), your API documentation is generated in real-time, allowing the client and server teams to agree on how their systems will work together.
11
11
12
12
Once you have defined your first operation, it drives a mock server, which enables client development happen in parallel with server development. As you build the client, you will discover further changes you'll need to make to your APIs, meaning another iteration of the specification.
Copy file name to clipboardExpand all lines: docs/mock-mode.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -252,7 +252,7 @@ Here's an example that returns some data whenever the `search()` handler method
252
252
253
253
After you're happy with your API design, you're ready to implement wire up the controller for the `/weather` path.
254
254
255
-
You simply specify in the Swagger spec the route handler (controller) file, which method to call in the controller (operationId), and any query parameters you wish to pass:
255
+
You simply specify in the OpenAPI spec the route handler (controller) file, which method to call in the controller (operationId), and any query parameters you wish to pass:
256
256
257
257
In weather sample's `swagger.yaml` file, it looks like this:
Copy file name to clipboardExpand all lines: docs/quick-start.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ That's it - You have now created, started and tested your first API project with
50
50
51
51
Open <project-root>/app.js in an editor. This is the main Node.js app that installs middleware and requires the API framework that you chose when you created your project.
52
52
53
-
The middleware modules perform tasks like Swagger specification validation and endpoint routing. For more information, see [swagger modules and dependencies](./modules.md).
53
+
The middleware modules perform tasks like OpenAPI Specification validation and endpoint routing. For more information, see [swagger modules and dependencies](./modules.md).
54
54
55
55
### <a name="openeditor"></a>Open the Swagger editor
Copy file name to clipboardExpand all lines: docs/swagger-about.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ To read more about Swagger, refer to:
20
20
21
21
The Swagger Editor lets you design your API specification and preview its documentation for your swagger API. The editor is installed with swagger.
22
22
23
-
A swagger.yaml file is installed into every new swagger project, and lives in `<project_root>/api/swagger/swagger.yaml`. It conforms to the [Swagger 2.0 specification](https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md).
23
+
A swagger.yaml file is installed into every new swagger project, and lives in `<project_root>/api/swagger/swagger.yaml`. It conforms to the [OpenAPI 2.0 Specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md).
24
24
25
25
Behind the scenes, Swagger middleware validates and processes the Swagger configuration file, and routes API operation endpoints to controller files. All **you** need to do is implement your custom API controller logic.
26
26
@@ -44,4 +44,4 @@ YAML is intended to be easy for humans to read. Every swagger project includes a
44
44
45
45
### <aname="nextstep"></a>Next step
46
46
47
-
For a more detailed look the Swagger configurations, see "[The Swagger specification file](./swagger-file.md)".
47
+
For a more detailed look the Swagger configurations, see "[The OpenAPI Specification file](./swagger-file.md)".
Copy file name to clipboardExpand all lines: docs/swagger-file.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
-
## <aname="understandingthespec"></a>Understanding the Swagger specification file
1
+
## <aname="understandingthespec"></a>Understanding the OpenAPI Specification file
2
2
3
3
*[Intro](#intro)
4
4
*[Default swagger project file](#default)
5
-
*[Swagger specification elements](#reference)
5
+
*[OpenAPI Specification elements](#reference)
6
6
7
7
### <aname="intro"></a>Intro
8
8
9
-
When you execute `swagger project create myproject`, a default Swagger model is placed in `myproject/api/swagger/swagger.yaml`. This model conforms to the [Swagger 2.0 specification](https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md).
9
+
When you execute `swagger project create myproject`, a default Swagger model is placed in `myproject/api/swagger/swagger.yaml`. This model conforms to the [OpenAPI 2.0 Specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md).
10
10
11
11
>Note: For a quick intro to swagger, see "[What is Swagger](./swagger-about.md)".
12
12
@@ -56,13 +56,13 @@ Here is the entire `swagger.yaml` file that is provisioned for a new swagger pro
56
56
```
57
57
58
58
59
-
###<aname="reference"></a>Swagger specification elements
59
+
###<aname="reference"></a>OpenAPI Specification elements
60
60
61
-
The Swagger file includes a number of standard Swagger 2.0 specification elements. You can read about them in the [Swagger 2.0 specification](https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md).
61
+
The Swagger file includes a number of standard OpenAPI 2.0 Specification elements. You can read about them in the [OpenAPI 2.0 Specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md).
62
62
63
63
Here's a brief description of the elements in a swagger project file:
64
64
65
-
***swagger: 2.0** - (Required) Identifies the version of the Swagger specification (2.0).
65
+
***swagger: 2.0** - (Required) Identifies the version of the OpenAPI Specification (2.0).
66
66
67
67
***info:** - (Required) Provides metadata about the API.
68
68
@@ -76,7 +76,7 @@ Here's a brief description of the elements in a swagger project file:
76
76
77
77
***produces:** - (Optional) A list of MIME types the APIs can produce.
78
78
79
-
***paths:** - (Required) Defines the available operations on the API. You'll spend most of your time configuring the paths part of the file. You can read about the path element in the [Swagger 2.0 specification](https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md). In general, the paths section specifies an operation's verb (like `get`), the endpoint for an API operation (like `/hello`), query parameters, and responses.
79
+
***paths:** - (Required) Defines the available operations on the API. You'll spend most of your time configuring the paths part of the file. You can read about the path element in the [OpenAPI 2.0 Specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md). In general, the paths section specifies an operation's verb (like `get`), the endpoint for an API operation (like `/hello`), query parameters, and responses.
80
80
81
81
***definitions:** - (Optional) These represent the structure of complex objects such as request and response bodies. For example, you might have a collection of `/users` that returns an array of `user` objects. You would describe these with two definitions: 1) to describe the `User` object, and 2) the definition of the `Users` array. Swagger uses [JSON-schema](http://json-schema.org/).
0 commit comments