Online demo at http://neo4j-swagger.tinj.com.
Swagger UI is part of Swagger project. The Swagger project allows you to produce, visualize and consume your OWN RESTful services. No proxy or 3rd party services required. Do it your own way.
You can use the swagger-ui code AS-IS! No need to build or recompile--just clone this repo and use the pre-built files in the
dist folder. If you like swagger-ui as-is, stop here.
You can rebuild swagger-ui on your own to tweak it or just so you can say you did. To do so, follow these steps:
Once you open the Swagger UI, it will load the Swagger Petstore service and show its APIs. You can enter your own server url and click explore to view the API.
You may choose to customize Swagger UI for your organization. Here is an overview of whats in its various directories:
To use swagger-ui you should take a look at the source of swagger-ui html page and customize it. This basically requires you to instantiate a SwaggerUi object and call load() on it as below:
swagger-ui supports invocation of all HTTP methods APIs including GET, PUT, POST, DELETE, PATCH, OPTIONS. These are handled in the swagger-js project, please see there for specifics on their usage.
// add a new ApiKeyAuthorization when the api-key changes in the ui.
This will add header
api_key with value
key on every call to the server. You can substitute
query to send the values as a query param.
If you have some header parameters which you need to send with every request, use the headers as below:
Note! You can pass multiple header params on a single request, just use unique names for them (
key is used in the above example).
Create your own fork of wordnik/swagger-ui
To share your changes, submit a pull request.
Copyright 2011-2013 Wordnik, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.