Last active
August 4, 2016 15:52
-
-
Save pthieu/d1d815b2cdb7c4a6327b4b4a08d06532 to your computer and use it in GitHub Desktop.
loopback basic app (created from apic cli)
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.2.2", | |
"title": "wlpn" | |
}, | |
"host": "phongs-macbook-pro.local:9446", | |
"basePath": "/api", | |
"consumes": [ | |
"application/json", | |
"application/x-www-form-urlencoded", | |
"application/xml", | |
"text/xml" | |
], | |
"produces": [ | |
"application/json", | |
"application/xml", | |
"text/xml", | |
"application/javascript", | |
"text/javascript" | |
], | |
"paths": { | |
"/Users/{id}/accessTokens/{fk}": { | |
"get": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Find a related item by id for accessTokens.", | |
"operationId": "User.prototype.__findById__accessTokens", | |
"parameters": [ | |
{ | |
"name": "fk", | |
"in": "path", | |
"description": "Foreign key for accessTokens", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"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": "fk", | |
"in": "path", | |
"description": "Foreign key for accessTokens", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"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": "fk", | |
"in": "path", | |
"description": "Foreign key for accessTokens", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "data", | |
"in": "body", | |
"required": false, | |
"schema": { | |
"$ref": "#/definitions/AccessToken" | |
} | |
}, | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"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": "filter", | |
"in": "query", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"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": "data", | |
"in": "body", | |
"required": false, | |
"schema": { | |
"$ref": "#/definitions/AccessToken" | |
} | |
}, | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"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": "where", | |
"in": "query", | |
"description": "Criteria to match model instances", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
}, | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"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": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"put": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Update an existing model instance or insert a new one into the data source.", | |
"operationId": "User.upsert", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"$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", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "array", | |
"items": { | |
"$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", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"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 | |
}, | |
"put": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Update attributes for a model instance and persist it into the data source.", | |
"operationId": "User.prototype.updateAttributes", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "An object of model property name/value pairs", | |
"required": false, | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
}, | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "User id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"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", | |
"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": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"description": "The number of instances updated", | |
"type": "object" | |
} | |
} | |
}, | |
"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` - `{User}` - 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/confirm": { | |
"get": { | |
"tags": [ | |
"User" | |
], | |
"summary": "Confirm a user registration with email 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 | |
} | |
}, | |
"/Messages/greet": { | |
"get": { | |
"tags": [ | |
"Message" | |
], | |
"operationId": "Message.greet", | |
"parameters": [ | |
{ | |
"name": "msg", | |
"in": "query", | |
"required": false, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"greeting": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/comments": { | |
"post": { | |
"tags": [ | |
"comment" | |
], | |
"summary": "Create a new instance of the model and persist it into the data source.", | |
"operationId": "comment.create", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"$ref": "#/definitions/comment" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/comment" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"put": { | |
"tags": [ | |
"comment" | |
], | |
"summary": "Update an existing model instance or insert a new one into the data source.", | |
"operationId": "comment.upsert", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "Model instance data", | |
"required": false, | |
"schema": { | |
"$ref": "#/definitions/comment" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/comment" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"get": { | |
"tags": [ | |
"comment" | |
], | |
"summary": "Find all instances of the model matched by filter from the data source.", | |
"operationId": "comment.find", | |
"parameters": [ | |
{ | |
"name": "filter", | |
"in": "query", | |
"description": "Filter defining fields, where, include, order, offset, and limit", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/comment" | |
} | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/comments/{id}/exists": { | |
"get": { | |
"tags": [ | |
"comment" | |
], | |
"summary": "Check whether a model instance exists in the data source.", | |
"operationId": "comment.exists__get_comments_{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 | |
} | |
}, | |
"/comments/{id}": { | |
"head": { | |
"tags": [ | |
"comment" | |
], | |
"summary": "Check whether a model instance exists in the data source.", | |
"operationId": "comment.exists__head_comments_{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": [ | |
"comment" | |
], | |
"summary": "Find a model instance by id from the data source.", | |
"operationId": "comment.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", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/comment" | |
} | |
} | |
}, | |
"deprecated": false | |
}, | |
"delete": { | |
"tags": [ | |
"comment" | |
], | |
"summary": "Delete a model instance by id from the data source.", | |
"operationId": "comment.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 | |
}, | |
"put": { | |
"tags": [ | |
"comment" | |
], | |
"summary": "Update attributes for a model instance and persist it into the data source.", | |
"operationId": "comment.prototype.updateAttributes", | |
"parameters": [ | |
{ | |
"name": "data", | |
"in": "body", | |
"description": "An object of model property name/value pairs", | |
"required": false, | |
"schema": { | |
"$ref": "#/definitions/comment" | |
} | |
}, | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "PersistedModel id", | |
"required": true, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/comment" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/comments/findOne": { | |
"get": { | |
"tags": [ | |
"comment" | |
], | |
"summary": "Find first instance of the model matched by filter from the data source.", | |
"operationId": "comment.findOne", | |
"parameters": [ | |
{ | |
"name": "filter", | |
"in": "query", | |
"description": "Filter defining fields, where, include, order, offset, and limit", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"$ref": "#/definitions/comment" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/comments/update": { | |
"post": { | |
"tags": [ | |
"comment" | |
], | |
"summary": "Update instances of the model matched by where from the data source.", | |
"operationId": "comment.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": { | |
"$ref": "#/definitions/comment" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"description": "The number of instances updated", | |
"type": "object" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
}, | |
"/comments/count": { | |
"get": { | |
"tags": [ | |
"comment" | |
], | |
"summary": "Count instances of the model matched by where from the data source.", | |
"operationId": "comment.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 | |
} | |
}, | |
"/comments/change-stream": { | |
"post": { | |
"tags": [ | |
"comment" | |
], | |
"summary": "Create a change stream.", | |
"operationId": "comment.createChangeStream__post_comments_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": [ | |
"comment" | |
], | |
"summary": "Create a change stream.", | |
"operationId": "comment.createChangeStream__get_comments_change-stream", | |
"parameters": [ | |
{ | |
"name": "options", | |
"in": "query", | |
"required": false, | |
"type": "string", | |
"format": "JSON" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Request was successful", | |
"schema": { | |
"type": "file" | |
} | |
} | |
}, | |
"deprecated": false | |
} | |
} | |
}, | |
"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" | |
}, | |
"created": { | |
"type": "string", | |
"format": "date" | |
}, | |
"userId": { | |
"type": "number", | |
"format": "double" | |
} | |
}, | |
"required": [ | |
"id" | |
], | |
"additionalProperties": false | |
}, | |
"User": { | |
"properties": { | |
"realm": { | |
"type": "string" | |
}, | |
"username": { | |
"type": "string" | |
}, | |
"credentials": { | |
"type": "object" | |
}, | |
"challenges": { | |
"type": "object" | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"emailVerified": { | |
"type": "boolean" | |
}, | |
"status": { | |
"type": "string" | |
}, | |
"created": { | |
"type": "string", | |
"format": "date" | |
}, | |
"lastUpdated": { | |
"type": "string", | |
"format": "date" | |
}, | |
"id": { | |
"type": "number", | |
"format": "double" | |
} | |
}, | |
"required": [ | |
"email" | |
], | |
"additionalProperties": false | |
}, | |
"comment": { | |
"properties": { | |
"text": { | |
"default": "blank", | |
"type": "string" | |
}, | |
"id": { | |
"type": "number", | |
"format": "double" | |
} | |
}, | |
"required": [ | |
"text" | |
], | |
"additionalProperties": false | |
} | |
}, | |
"tags": [ | |
{ | |
"name": "User" | |
}, | |
{ | |
"name": "Message" | |
}, | |
{ | |
"name": "comment" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment