This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker rm -v $(sudo docker ps -a -q -f status=exited); sudo docker rmi $(sudo docker images -f "dangling=true" -q); sudo docker volume rm $(sudo docker volume ls -qf dangling=true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"swagger":"2.0","info":{"description":"This is an online swagger codegen server. You can find out more at https://github.com/swagger-api/swagger-codegen or on [irc.freenode.net, #swagger](http://swagger.io/irc/).","version":"2.2.0-SNAPSHOT","title":"Swagger Generator","termsOfService":"http://swagger.io/terms/","contact":{"name":"apiteam@swagger.io"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"basePath":"/api","tags":[{"name":"gen"},{"name":"clients"},{"name":"servers"}],"paths":{"/gen/clients":{"get":{"tags":["clients"],"summary":"Gets languages supported by the client generator","description":"","operationId":"clientOptions","parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"type":"string"}}}}}},"/gen/clients/{language}":{"get":{"tags":["clients"],"summary":"Returns options for a client library","description":"","operationId":"getClientOptions","produces":["application/json"],"parameters":[{"name":"langu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"swagger":"2.0","info":{"description":"This is an online swagger codegen server. You can find out more at https://github.com/swagger-api/swagger-codegen or on [irc.freenode.net, #swagger](http://swagger.io/irc/).","version":"2.2.0-SNAPSHOT","title":"Swagger Generator","termsOfService":"http://swagger.io/terms/","contact":{"name":"apiteam@swagger.io"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"basePath":"/api","tags":[{"name":"gen"},{"name":"clients"},{"name":"servers"}],"paths":{"/gen/clients":{"get":{"tags":["clients"],"summary":"Gets languages supported by the client generator","description":"","operationId":"clientOptions","parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"type":"string"}}}}}},"/gen/clients/{language}":{"get":{"tags":["clients"],"summary":"Returns options for a client library","description":"","operationId":"getClientOptions","produces":["application/json"],"parameters":[{"name":"langu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Run with... | |
# Use the raw github link ( there will be a button on this page) | |
# curl -sL https://gist.githubusercontent.com/.... | sudo bash | |
echo ==================================================== | |
docker rm -v $(docker ps -a -q -f status=exited) || echo 'No containers to clean up with status=exited' | |
echo ==================================================== | |
docker rmi $(docker images -f "dangling=true" -q) || echo 'No images to clean up with dangling=true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger": "2.0", | |
"info": { | |
"title": "Valid JSON" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger": "2.0", | |
"info": { | |
"title": not [ quite valid.... | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a[ one # two |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "fromTheGist": true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
window.swaggerUi = new SwaggerUi({ | |
url: url, | |
dom_id: "swagger-ui-container", | |
authorizations: { | |
someName: function() { | |
// This function will get called /before/ each request | |
// ... UNLESS you have a 'security' tag in the swagger.json file, in which case you must add 'someName' to the list of auths. | |
console.log('explore the request object...',this) // Take a look in the console tab to see what's available. | |
this.headers['x-swagger'] = 'value'; // Example header |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src='browser/swagger-client.js' type='text/javascript'></script> | |
<script type="text/javascript"> | |
// initialize swagger, point to a resource listing | |
window.swagger = new SwaggerClient({ | |
url: "http://petstore.swagger.io/api/api-docs", | |
success: function() { | |
// This will add a query parameter called api_key with the value 'special-key' | |
this.clientAuthorizations.add("api_key", new client.ApiKeyAuthorization("api_key","special-key","query")); |