Created
December 18, 2017 14:52
-
-
Save deostroll/851e3f604ab9c66fbb64ce91d97642a7 to your computer and use it in GitHub Desktop.
for github issue https://github.com/swagger-api/swagger-js/issues/1199
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": { | |
"version": "1.0.0", | |
"title": "mylbproj1" | |
}, | |
"basePath": "/api", | |
"paths": { | |
"/Users/{id}/accessTokens/{fk}": { | |
"get": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Find a related item by id for accessTokens.", | |
"operationId": "User.prototype.__findById__accessTokens", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "fk", | |
"in": "path", | |
"description": "Foreign key for accessTokens", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/AccessToken" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"delete": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Delete a related item by id for accessTokens.", | |
"operationId": "User.prototype.__destroyById__accessTokens", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "fk", | |
"in": "path", | |
"description": "Foreign key for accessTokens", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"204": { | |
"description": "Request was successful" | |
} | |
}, | |
"deprecated": false | |
}, | |
"put": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Update a related item by id for accessTokens.", | |
"operationId": "User.prototype.__updateById__accessTokens", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "fk", | |
"in": "path", | |
"description": "Foreign key for accessTokens", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"required": false, | |
"schema": { | |
"$ref": "#/definitions/AccessToken" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/AccessToken" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/{id}/accessTokens": { | |
"get": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Queries accessTokens of User.", | |
"operationId": "User.prototype.__get__accessTokens", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "filter", | |
"in": "query", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/AccessToken" | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Creates a new instance in accessTokens of this model.", | |
"operationId": "User.prototype.__create__accessTokens", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"required": false, | |
"schema": { | |
"$ref": "#/definitions/AccessToken" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/AccessToken" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"delete": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Deletes all accessTokens of this model.", | |
"operationId": "User.prototype.__delete__accessTokens", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"204": { | |
"description": "Request was successful" | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/{id}/accessTokens/count": { | |
"get": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Counts accessTokens of User.", | |
"operationId": "User.prototype.__count__accessTokens", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "where", | |
"in": "query", | |
"description": "Criteria to match model instances", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "number", | |
"format": "double" | |
} | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users": { | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Create a new instance of the model and persist it into the data source.", | |
"operationId": "User.create", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"description": "Model instance data", | |
"$ref": "#/definitions/$new_User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"patch": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Patch an existing model instance or insert a new one into the data source.", | |
"operationId": "User.patchOrCreate", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"description": "Model instance data", | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"put": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Replace an existing model instance or insert a new one into the data source.", | |
"operationId": "User.replaceOrCreate__put_Users", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"description": "Model instance data", | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"get": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Find all instances of the model matched by filter from the data source.", | |
"operationId": "User.find", | |
"parameters": [ | |
{ | |
"name": "filter", | |
"in": "query", | |
"description": "Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/replaceOrCreate": { | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Replace an existing model instance or insert a new one into the data source.", | |
"operationId": "User.replaceOrCreate__post_Users_replaceOrCreate", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"description": "Model instance data", | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/upsertWithWhere": { | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Update an existing model instance or insert a new one into the data source based on the where criteria.", | |
"operationId": "User.upsertWithWhere", | |
"parameters": [ | |
{ | |
"name": "where", | |
"in": "query", | |
"description": "Criteria to match model instances", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "An object of model property name/value pairs", | |
"required": false, | |
"schema": { | |
"description": "An object of model property name/value pairs", | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/{id}/exists": { | |
"get": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Check whether a model instance exists in the data source.", | |
"operationId": "User.exists__get_Users_{id}_exists", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Model id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"exists": { | |
"type": "boolean" | |
} | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/{id}": { | |
"head": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Check whether a model instance exists in the data source.", | |
"operationId": "User.exists__head_Users_{id}", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Model id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"exists": { | |
"type": "boolean" | |
} | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"get": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Find a model instance by {{id}} from the data source.", | |
"operationId": "User.findById", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Model id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "filter", | |
"in": "query", | |
"description": "Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"put": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Replace attributes for a model instance and persist it into the data source.", | |
"operationId": "User.replaceById__put_Users_{id}", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Model id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"description": "Model instance data", | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"delete": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Delete a model instance by {{id}} from the data source.", | |
"operationId": "User.deleteById", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Model id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "object" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"patch": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Patch attributes for a model instance and persist it into the data source.", | |
"operationId": "User.prototype.patchAttributes", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "An object of model property name/value pairs", | |
"required": false, | |
"schema": { | |
"description": "An object of model property name/value pairs", | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/{id}/replace": { | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Replace attributes for a model instance and persist it into the data source.", | |
"operationId": "User.replaceById__post_Users_{id}_replace", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Model id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"description": "Model instance data", | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/findOne": { | |
"get": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Find first instance of the model matched by filter from the data source.", | |
"operationId": "User.findOne", | |
"parameters": [ | |
{ | |
"name": "filter", | |
"in": "query", | |
"description": "Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/update": { | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Update instances of the model matched by {{where}} from the data source.", | |
"operationId": "User.updateAll", | |
"parameters": [ | |
{ | |
"name": "where", | |
"in": "query", | |
"description": "Criteria to match model instances", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "An object of model property name/value pairs", | |
"required": false, | |
"schema": { | |
"description": "An object of model property name/value pairs", | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"description": "Information related to the outcome of the operation", | |
"type": "object", | |
"properties": { | |
"count": { | |
"description": "The number of instances updated", | |
"type": "number", | |
"format": "double" | |
} | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/count": { | |
"get": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Count instances of the model matched by where from the data source.", | |
"operationId": "User.count", | |
"parameters": [ | |
{ | |
"name": "where", | |
"in": "query", | |
"description": "Criteria to match model instances", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "number", | |
"format": "double" | |
} | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/change-stream": { | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Create a change stream.", | |
"operationId": "User.createChangeStream__post_Users_change-stream", | |
"parameters": [ | |
{ | |
"name": "options", | |
"in": "formData", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "file" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"get": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Create a change stream.", | |
"operationId": "User.createChangeStream__get_Users_change-stream", | |
"parameters": [ | |
{ | |
"name": "options", | |
"in": "query", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "file" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/login": { | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Login a user with username/email and password.", | |
"operationId": "User.login", | |
"parameters": [ | |
{ | |
"name": "credentials", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "object" | |
} | |
}, | |
{ | |
"name": "include", | |
"in": "query", | |
"description": "Related objects to include in the response. See the description of return value for more details.", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"description": "The response body contains properties of the AccessToken created on login.\nDepending on the value of `include` parameter, the body may contain additional properties:\n\n - `user` - `U+007BUserU+007D` - Data of the currently logged in user. (`include=user`)\n\n", | |
"type": "object" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/logout": { | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Logout a user with access token.", | |
"operationId": "User.logout", | |
"parameters": [], | |
"responses": { | |
"204": { | |
"description": "Request was successful" | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/{id}/verify": { | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Trigger user's identity verification with configured verifyOptions", | |
"operationId": "User.prototype.verify", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"204": { | |
"description": "Request was successful" | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/confirm": { | |
"get": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Confirm a user registration with identity verification token.", | |
"operationId": "User.confirm", | |
"parameters": [ | |
{ | |
"name": "uid", | |
"in": "query", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"name": "token", | |
"in": "query", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"name": "redirect", | |
"in": "query", | |
"required": false, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"204": { | |
"description": "Request was successful" | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/reset": { | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Reset password for a user with email.", | |
"operationId": "User.resetPassword", | |
"parameters": [ | |
{ | |
"name": "options", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "object" | |
} | |
} | |
], | |
"responses": { | |
"204": { | |
"description": "Request was successful" | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/change-password": { | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Change a user's password.", | |
"operationId": "User.changePassword", | |
"parameters": [ | |
{ | |
"name": "oldPassword", | |
"in": "formData", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"name": "newPassword", | |
"in": "formData", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"204": { | |
"description": "Request was successful" | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Users/reset-password": { | |
"post": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Reset user's password via a password-reset token.", | |
"operationId": "User.setPassword", | |
"parameters": [ | |
{ | |
"name": "newPassword", | |
"in": "formData", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"204": { | |
"description": "Request was successful" | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Persons": { | |
"post": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Create a new instance of the model and persist it into the data source.", | |
"operationId": "Person.create", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"description": "Model instance data", | |
"$ref": "#/definitions/$new_Person" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/Person" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"patch": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Patch an existing model instance or insert a new one into the data source.", | |
"operationId": "Person.patchOrCreate", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"description": "Model instance data", | |
"$ref": "#/definitions/Person" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/Person" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"put": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Replace an existing model instance or insert a new one into the data source.", | |
"operationId": "Person.replaceOrCreate__put_Persons", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"description": "Model instance data", | |
"$ref": "#/definitions/Person" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/Person" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"get": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Find all instances of the model matched by filter from the data source.", | |
"operationId": "Person.find", | |
"parameters": [ | |
{ | |
"name": "filter", | |
"in": "query", | |
"description": "Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Person" | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Persons/replaceOrCreate": { | |
"post": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Replace an existing model instance or insert a new one into the data source.", | |
"operationId": "Person.replaceOrCreate__post_Persons_replaceOrCreate", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"description": "Model instance data", | |
"$ref": "#/definitions/Person" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/Person" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Persons/upsertWithWhere": { | |
"post": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Update an existing model instance or insert a new one into the data source based on the where criteria.", | |
"operationId": "Person.upsertWithWhere", | |
"parameters": [ | |
{ | |
"name": "where", | |
"in": "query", | |
"description": "Criteria to match model instances", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "An object of model property name/value pairs", | |
"required": false, | |
"schema": { | |
"description": "An object of model property name/value pairs", | |
"$ref": "#/definitions/Person" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/Person" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Persons/{id}/exists": { | |
"get": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Check whether a model instance exists in the data source.", | |
"operationId": "Person.exists__get_Persons_{id}_exists", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Model id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"exists": { | |
"type": "boolean" | |
} | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Persons/{id}": { | |
"head": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Check whether a model instance exists in the data source.", | |
"operationId": "Person.exists__head_Persons_{id}", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Model id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"exists": { | |
"type": "boolean" | |
} | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"get": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Find a model instance by {{id}} from the data source.", | |
"operationId": "Person.findById", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Model id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "filter", | |
"in": "query", | |
"description": "Filter defining fields and include - must be a JSON-encoded string ({\"something\":\"value\"})", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/Person" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"put": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Replace attributes for a model instance and persist it into the data source.", | |
"operationId": "Person.replaceById__put_Persons_{id}", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Model id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"description": "Model instance data", | |
"$ref": "#/definitions/Person" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/Person" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"delete": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Delete a model instance by {{id}} from the data source.", | |
"operationId": "Person.deleteById", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Model id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "object" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"patch": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Patch attributes for a model instance and persist it into the data source.", | |
"operationId": "Person.prototype.patchAttributes", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Person id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "An object of model property name/value pairs", | |
"required": false, | |
"schema": { | |
"description": "An object of model property name/value pairs", | |
"$ref": "#/definitions/Person" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/Person" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Persons/{id}/replace": { | |
"post": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Replace attributes for a model instance and persist it into the data source.", | |
"operationId": "Person.replaceById__post_Persons_{id}_replace", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "Model id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"description": "Model instance data", | |
"$ref": "#/definitions/Person" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/Person" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Persons/findOne": { | |
"get": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Find first instance of the model matched by filter from the data source.", | |
"operationId": "Person.findOne", | |
"parameters": [ | |
{ | |
"name": "filter", | |
"in": "query", | |
"description": "Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({\"something\":\"value\"})", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/Person" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Persons/update": { | |
"post": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Update instances of the model matched by {{where}} from the data source.", | |
"operationId": "Person.updateAll", | |
"parameters": [ | |
{ | |
"name": "where", | |
"in": "query", | |
"description": "Criteria to match model instances", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "An object of model property name/value pairs", | |
"required": false, | |
"schema": { | |
"description": "An object of model property name/value pairs", | |
"$ref": "#/definitions/Person" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"description": "Information related to the outcome of the operation", | |
"type": "object", | |
"properties": { | |
"count": { | |
"description": "The number of instances updated", | |
"type": "number", | |
"format": "double" | |
} | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Persons/count": { | |
"get": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Count instances of the model matched by where from the data source.", | |
"operationId": "Person.count", | |
"parameters": [ | |
{ | |
"name": "where", | |
"in": "query", | |
"description": "Criteria to match model instances", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "number", | |
"format": "double" | |
} | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Persons/change-stream": { | |
"post": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Create a change stream.", | |
"operationId": "Person.createChangeStream__post_Persons_change-stream", | |
"parameters": [ | |
{ | |
"name": "options", | |
"in": "formData", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "file" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"get": { | |
"tags": [ | |
"Person" | |
], | |
"summary": "Create a change stream.", | |
"operationId": "Person.createChangeStream__get_Persons_change-stream", | |
"parameters": [ | |
{ | |
"name": "options", | |
"in": "query", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "file" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/Persons/fetch": { | |
"post": { | |
"tags": [ | |
"Person" | |
], | |
"operationId": "Person.fetch", | |
"parameters": [ | |
{ | |
"name": "limit", | |
"in": "formData", | |
"required": false, | |
"type": "number", | |
"format": "double" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "object" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
} | |
}, | |
"tags": [ | |
{ | |
"name": "User" | |
}, | |
{ | |
"name": "Person" | |
} | |
], | |
"consumes": [ | |
"application/json", | |
"application/x-www-form-urlencoded", | |
"application/xml", | |
"text/xml" | |
], | |
"produces": [ | |
"application/json", | |
"application/xml", | |
"text/xml", | |
"application/javascript", | |
"text/javascript" | |
], | |
"definitions": { | |
"x-any": { | |
"properties": {} | |
}, | |
"AccessToken": { | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"ttl": { | |
"default": 1209600, | |
"description": "time to live in seconds (2 weeks by default)", | |
"type": "number", | |
"format": "double" | |
}, | |
"scopes": { | |
"description": "Array of scopes granted to this access token.", | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"created": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"userId": { | |
"type": "number", | |
"format": "double" | |
} | |
}, | |
"required": [ | |
"id" | |
], | |
"additionalProperties": false | |
}, | |
"$new_User": { | |
"properties": { | |
"realm": { | |
"type": "string" | |
}, | |
"username": { | |
"type": "string" | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"emailVerified": { | |
"type": "boolean" | |
} | |
}, | |
"required": [ | |
"email" | |
], | |
"additionalProperties": false | |
}, | |
"User": { | |
"properties": { | |
"realm": { | |
"type": "string" | |
}, | |
"username": { | |
"type": "string" | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"emailVerified": { | |
"type": "boolean" | |
}, | |
"id": { | |
"type": "number", | |
"format": "double" | |
} | |
}, | |
"required": [ | |
"email" | |
], | |
"additionalProperties": false | |
}, | |
"$new_Person": { | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"age": { | |
"type": "number", | |
"format": "double" | |
}, | |
"gender": { | |
"type": "string" | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"Person": { | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"age": { | |
"type": "number", | |
"format": "double" | |
}, | |
"gender": { | |
"type": "string" | |
}, | |
"id": { | |
"type": "number", | |
"format": "double" | |
} | |
}, | |
"additionalProperties": false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment