swagger-editor 4.0.7 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -113,19 +113,20 @@ docker run -d -p 80:8080 swaggerapi/swagger-editor
|
|
|
113
113
|
|
|
114
114
|
This will run Swagger Editor (in detached mode) on port 80 on your machine, so you can open it by navigating to `http://localhost` in your browser.
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
* You can provide your own `json` or `yaml` definition file on your host
|
|
116
|
+
* You can provide a URL pointing to an API definition (may not be available if some security policies such as CSP or CORS are enforced):
|
|
118
117
|
|
|
119
118
|
```
|
|
120
|
-
docker run -d -p 80:8080 -
|
|
119
|
+
docker run -d -p 80:8080 -e URL="https://petstore3.swagger.io/api/v3/openapi.json" swaggerapi/swagger-editor
|
|
121
120
|
```
|
|
122
121
|
|
|
123
|
-
* You can provide
|
|
122
|
+
* You can provide your own `json` or `yaml` definition file from your local host:
|
|
124
123
|
|
|
125
124
|
```
|
|
126
|
-
docker run -d -p 80:8080 -e
|
|
125
|
+
docker run -d -p 80:8080 -v $(pwd):/tmp -e SWAGGER_FILE=/tmp/swagger.json swaggerapi/swagger-editor
|
|
127
126
|
```
|
|
128
127
|
|
|
128
|
+
**Note:** When both `URL` and `SWAGGER_FILE` environment variables are set, `URL` has priority and `SWAGGER_FILE` is ignored.
|
|
129
|
+
|
|
129
130
|
* You can specify a different base url for accessing the application - for example if you want the application to be available at `http://localhost/swagger-editor/`:
|
|
130
131
|
|
|
131
132
|
```
|
|
@@ -148,7 +149,6 @@ docker build -t swagger-editor .
|
|
|
148
149
|
|
|
149
150
|
# Run the container
|
|
150
151
|
docker run -d -p 80:8080 swagger-editor
|
|
151
|
-
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
You can then view the app by navigating to `http://localhost` in your browser.
|