-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #405 from swagger-api/issue#404
fix and test for issue #404 NullExample
- Loading branch information
Showing
3 changed files
with
192 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"description": "Blah", | ||
"version": "1.0.0", | ||
"title": "Blah", | ||
"termsOfService": "", | ||
"contact": { | ||
"email": "" | ||
}, | ||
"license": { | ||
"name": "", | ||
"url": "http://unlicense.org" | ||
} | ||
}, | ||
"basePath": "/rest", | ||
"tags": [ | ||
], | ||
"paths": { | ||
"/v1/tx/packages/{package_id}": { | ||
"get": { | ||
"tags": [ | ||
"Packages" | ||
], | ||
"summary": "Get a package", | ||
"description": "Get details about a package", | ||
"operationId": "getPackage", | ||
"produces": [ | ||
"application/json;charset=utf-8" | ||
], | ||
"parameters": [ | ||
{ | ||
"name": "package_id", | ||
"in": "path", | ||
"description": "ID of the package", | ||
"required": true, | ||
"type": "string" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Error", | ||
"schema": { | ||
"$ref": "#/definitions/Bundle" | ||
} | ||
} | ||
} | ||
}, | ||
"put": { | ||
"tags": [ | ||
"Packages" | ||
], | ||
"summary": "Edit a package definition", | ||
"description": "Replace package definition", | ||
"operationId": "replacePackage", | ||
"consumes": [ | ||
"application/json;charset=utf-8" | ||
], | ||
"produces": [ | ||
"application/json;charset=utf-8" | ||
], | ||
"parameters": [ | ||
{ | ||
"name": "package_id", | ||
"in": "path", | ||
"description": "ID of the package", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"in": "body", | ||
"name": "body", | ||
"description": "Package definition.", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/Bundle" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Error", | ||
"schema": { | ||
"$ref": "#/definitions/Bundle" | ||
} | ||
}, | ||
"401": { | ||
"description": "Unauthorized", | ||
"schema": { | ||
"$ref": "#/definitions/Bundle" | ||
} | ||
}, | ||
"403": { | ||
"description": "Forbidden", | ||
"schema": { | ||
"$ref": "#/definitions/Bundle" | ||
} | ||
} | ||
} | ||
}, | ||
"delete": { | ||
"tags": [ | ||
"Packages" | ||
], | ||
"summary": "Delete a package", | ||
"description": "Remove a package", | ||
"operationId": "deletePackage", | ||
"produces": [ | ||
"application/json;charset=utf-8" | ||
], | ||
"parameters": [ | ||
{ | ||
"name": "package_id", | ||
"in": "path", | ||
"description": "ID of the package", | ||
"required": true, | ||
"type": "string" | ||
} | ||
], | ||
"responses": { | ||
"204": { | ||
"description": "Success" | ||
}, | ||
"401": { | ||
"description": "Unauthorized" | ||
}, | ||
"403": { | ||
"description": "Forbidden" | ||
}, | ||
"200": { | ||
"description": "Error" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"Annotation": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "Annotation name" | ||
}, | ||
"value": { | ||
"type": "string", | ||
"description": "Annotation value" | ||
} | ||
}, | ||
"description": "Resource annotation" | ||
}, | ||
"Bundle": { | ||
"type": "object", | ||
"properties": { | ||
"_id": { | ||
"type": "string", | ||
"description": "The id of the object" | ||
}, | ||
"project_id": { | ||
"type": "string", | ||
"description": "The project id of the map or file" | ||
}, | ||
"href": { | ||
"type": "string", | ||
"description": "The URI for the object" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "Name of the package" | ||
} | ||
} | ||
}, | ||
"description": "A bundle (package)" | ||
} | ||
} |