Skip to content

Instantly share code, notes, and snippets.

@darosh
Last active May 23, 2016 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darosh/81151e4b94d7123eb89c390aa0ec9bf4 to your computer and use it in GitHub Desktop.
Save darosh/81151e4b94d7123eb89c390aa0ec9bf4 to your computer and use it in GitHub Desktop.
Swagger API Relations

This works probably only for blueprint/entity based APIs like loopback.io.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<style>
text {
font-size: 14px;
line-height: 14px;
}
.node rect {
fill: orange;
fill-opacity: 0.42;
stroke: #666;
stroke-opacity: 0.66;
stroke-width: 0.5px;
shape-rendering: geometricPrecision;
}
.node text {
fill: #333;
}
.edgePath path {
stroke: #666;
stroke-opacity: 0.5;
stroke-width: 1.5px;
}
body {
margin: 24px;
font-family: sans-serif;
}
hr {
border: 0;
height: 1px;
background: #ccc;
margin: 12px 0;
}
input {
width: 600px;
}
</style>
</head>
<body>
Swagger URL <input type="text" id="url" value="./swagger.json">
<hr>
<script src="//d3js.org/d3.v3.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/dagre-d3/0.4.17/dagre-d3.js"></script>
<script>
var SVG = d3.select('body').append('svg');
var ROOT = SVG.append('g');
var RENDER = new dagreD3.render();
var ICONS = {
get: 'arrow_forward',
post: 'arrow_backward',
put: 'chevron_left',
patch: 'first_page',
delete: 'close',
options: 'radio_button_unchecked',
head: 'sentiment_neutral'
};
var methods = ['get', 'post', 'put', 'path', 'delete', 'head', 'options'];
var exclude = ['findOne'];
function chart (data) {
var g = new dagreD3.graphlib.Graph()
.setGraph({
rankdir: 'LR',
nodesep: 24,
ranksep: 48
});
data.nodes.forEach(function (item, index) {
g.setNode(index, {
label: item,
height: 20,
rx: 0,
ry: 0,
paddingLeft: 10,
paddingRight: 10,
paddingTop: 2,
paddingBottom: 5
});
});
data.links.forEach(function (link) {
var s = data.nodes.indexOf(link[0]);
var t = data.nodes.indexOf(link[1]);
g.setEdge(s, t, {
lineInterpolate: 'bundle'
});
});
RENDER(ROOT, g);
ROOT.attr('transform', 'translate(' + [2, 2.5] + ')');
SVG.attr('height', ((g.graph().height > 0) ? g.graph().height : 0) + 4 + 14)
.attr('width', ((g.graph().width > 0) ? g.graph().width : 0) + 4);
setTimeout(function () {
try {
d3.select(self.frameElement).style('height', (48 + document.body.getBoundingClientRect().height) + 'px');
} catch (ign) {
}
}, 50);
}
function swaggerPathModels (swagger) {
var routes = {};
Object.keys(swagger.paths).forEach(function (path) {
var pathObject = swagger.paths[path];
var parts = path.split('/');
var parent = routes;
parts.forEach(function (part) {
if (exclude.indexOf(part) > -1) {
return;
}
var p = part.replace(/\{.*}/g, '');
if (p) {
parent[p] = parent[p] || {};
parent = parent[p];
}
});
methods.forEach(function (method) {
var op = pathObject[method];
if (op) {
parent.$models = parent.$models || {};
operationModels(op, parent.$models);
if (!Object.keys(parent.$models).length) {
delete parent.$models;
}
}
});
});
var nodes = {};
var links = {};
function iterate (route) {
if (!route.$models) {
return;
}
var sources = Object.keys(route.$models);
var targets = {};
Object.keys(route).forEach(function (subRoute) {
if (subRoute === '$models') {
return;
}
var obj = route[subRoute];
if (obj.$models) {
Object.keys(obj.$models).forEach(function (target) {
targets[target] = true;
});
iterate(obj);
}
});
sources.forEach(function (source) {
nodes[source] = true;
Object.keys(targets).forEach(function (target) {
nodes[target] = true;
var link = [source, target];
links[link.toString()] = link;
});
});
}
Object.keys(routes).forEach(function (route) {
iterate(routes[route]);
});
return {
nodes: Object.keys(nodes),
links: Object.keys(links).map(function (link) {
return links[link];
})
};
}
function operationModels (op, models) {
Object.keys(op.responses).forEach(function (response) {
var responseObject = op.responses[response];
var schema = responseObject.schema;
if (schema) {
var ref = schema.$ref || (schema.items && schema.items.$ref);
if (ref) {
ref = ref.replace('#/definitions/', '');
models[ref] = true;
}
}
});
}
function swaggerRelations (swagger) {
var relations = {};
var nodes = {};
Object.keys(swagger.paths).forEach(function (path) {
var pathObject = swagger.paths[path];
methods.forEach(function (method) {
var op = pathObject[method];
if (op) {
Object.keys(op.responses).forEach(function (response) {
var responseObject = op.responses[response];
var schema = responseObject.schema;
if (schema) {
var ref = schema.$ref || (schema.items && schema.items.$ref);
if (ref) {
ref = ref.replace('#/definitions/', '');
(op.tags || []).forEach(function (tag) {
if (tag !== ref) {
relations[tag] = relations[tag] || {};
relations[tag][ref] = true;
nodes[tag] = true;
nodes[ref] = true;
}
});
}
}
});
}
});
});
var links = [];
Object.keys(relations).forEach(function (source) {
Object.keys(relations[source]).forEach(function (target) {
links.push([source, target]);
});
});
return {
nodes: Object.keys(nodes),
links: links
};
}
function load (url) {
d3.select('#url').attr('disabled', true);
d3.json(url, function (error, swagger) {
d3.select('#url').attr('disabled', null);
if (error) throw error;
// var data = swaggerRelations(swagger);
var data = swaggerPathModels(swagger);
chart(data);
});
}
d3.select('#url').on('input', function () {
load(this.value);
});
d3.selectAll('a').on('click', function () {
d3.event.preventDefault();
d3.select('#url').attr('value', this.href);
load(this.href);
});
// load('https://apis-guru.github.io/api-models/instagram.com/1.0.0/swagger.json');
load('./swagger.json');
</script>
</body>
</html>
{"swagger":"2.0","info":{"version":"1.0.2","title":"Booking"},"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":{"/places/{id}/courts/{fk}":{"get":{"tags":["Place"],"summary":"Find a related item by id for courts.","operationId":"Place.prototype.__findById__courts","parameters":[{"name":"fk","in":"path","description":"Foreign key for courts","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Court"}}},"deprecated":false},"delete":{"tags":["Place"],"summary":"Delete a related item by id for courts.","operationId":"Place.prototype.__destroyById__courts","parameters":[{"name":"fk","in":"path","description":"Foreign key for courts","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false},"put":{"tags":["Place"],"summary":"Update a related item by id for courts.","operationId":"Place.prototype.__updateById__courts","parameters":[{"name":"fk","in":"path","description":"Foreign key for courts","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Court"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Court"}}},"deprecated":false}},"/places/{id}/courts":{"get":{"tags":["Place"],"summary":"Queries courts of Place.","operationId":"Place.prototype.__get__courts","parameters":[{"name":"filter","in":"query","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/Court"}}}},"deprecated":false},"post":{"tags":["Place"],"summary":"Creates a new instance in courts of this model.","operationId":"Place.prototype.__create__courts","parameters":[{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Court"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Court"}}},"deprecated":false},"delete":{"tags":["Place"],"summary":"Deletes all courts of this model.","operationId":"Place.prototype.__delete__courts","parameters":[{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/places/{id}/courts/count":{"get":{"tags":["Place"],"summary":"Counts courts of Place.","operationId":"Place.prototype.__count__courts","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/places":{"post":{"tags":["Place"],"summary":"Create a new instance of the model and persist it into the data source.","operationId":"Place.create","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Place"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Place"}}},"deprecated":false},"put":{"tags":["Place"],"summary":"Update an existing model instance or insert a new one into the data source.","operationId":"Place.upsert","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Place"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Place"}}},"deprecated":false},"get":{"tags":["Place"],"summary":"Find all instances of the model matched by filter from the data source.","operationId":"Place.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/Place"}}}},"deprecated":false}},"/places/{id}/exists":{"get":{"tags":["Place"],"summary":"Check whether a model instance exists in the data source.","operationId":"Place.exists__get_places_{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"}}},"deprecated":false}},"/places/{id}":{"head":{"tags":["Place"],"summary":"Check whether a model instance exists in the data source.","operationId":"Place.exists__head_places_{id}","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},"get":{"tags":["Place"],"summary":"Find a model instance by id from the data source.","operationId":"Place.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/Place"}}},"deprecated":false},"delete":{"tags":["Place"],"summary":"Delete a model instance by id from the data source.","operationId":"Place.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":["Place"],"summary":"Update attributes for a model instance and persist it into the data source.","operationId":"Place.prototype.updateAttributes","parameters":[{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"$ref":"#/definitions/Place"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Place"}}},"deprecated":false}},"/places/findOne":{"get":{"tags":["Place"],"summary":"Find first instance of the model matched by filter from the data source.","operationId":"Place.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/Place"}}},"deprecated":false}},"/places/update":{"post":{"tags":["Place"],"summary":"Update instances of the model matched by where from the data source.","operationId":"Place.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/Place"}}],"responses":{"200":{"description":"Request was successful","schema":{"description":"The number of instances updated","type":"object"}}},"deprecated":false}},"/places/count":{"get":{"tags":["Place"],"summary":"Count instances of the model matched by where from the data source.","operationId":"Place.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"}}},"deprecated":false}},"/places/change-stream":{"post":{"tags":["Place"],"summary":"Create a change stream.","operationId":"Place.createChangeStream__post_places_change-stream","parameters":[{"name":"options","in":"formData","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false},"get":{"tags":["Place"],"summary":"Create a change stream.","operationId":"Place.createChangeStream__get_places_change-stream","parameters":[{"name":"options","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/courts/{id}/place":{"get":{"tags":["Court"],"summary":"Fetches belongsTo relation place.","operationId":"Court.prototype.__get__place","parameters":[{"name":"refresh","in":"query","required":false,"type":"boolean"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Place"}}},"deprecated":false}},"/courts":{"post":{"tags":["Court"],"summary":"Create a new instance of the model and persist it into the data source.","operationId":"Court.create","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Court"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Court"}}},"deprecated":false},"put":{"tags":["Court"],"summary":"Update an existing model instance or insert a new one into the data source.","operationId":"Court.upsert","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Court"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Court"}}},"deprecated":false},"get":{"tags":["Court"],"summary":"Find all instances of the model matched by filter from the data source.","operationId":"Court.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/Court"}}}},"deprecated":false}},"/courts/{id}/exists":{"get":{"tags":["Court"],"summary":"Check whether a model instance exists in the data source.","operationId":"Court.exists__get_courts_{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"}}},"deprecated":false}},"/courts/{id}":{"head":{"tags":["Court"],"summary":"Check whether a model instance exists in the data source.","operationId":"Court.exists__head_courts_{id}","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},"get":{"tags":["Court"],"summary":"Find a model instance by id from the data source.","operationId":"Court.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/Court"}}},"deprecated":false},"delete":{"tags":["Court"],"summary":"Delete a model instance by id from the data source.","operationId":"Court.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":["Court"],"summary":"Update attributes for a model instance and persist it into the data source.","operationId":"Court.prototype.updateAttributes","parameters":[{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"$ref":"#/definitions/Court"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Court"}}},"deprecated":false}},"/courts/findOne":{"get":{"tags":["Court"],"summary":"Find first instance of the model matched by filter from the data source.","operationId":"Court.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/Court"}}},"deprecated":false}},"/courts/update":{"post":{"tags":["Court"],"summary":"Update instances of the model matched by where from the data source.","operationId":"Court.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/Court"}}],"responses":{"200":{"description":"Request was successful","schema":{"description":"The number of instances updated","type":"object"}}},"deprecated":false}},"/courts/count":{"get":{"tags":["Court"],"summary":"Count instances of the model matched by where from the data source.","operationId":"Court.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"}}},"deprecated":false}},"/courts/change-stream":{"post":{"tags":["Court"],"summary":"Create a change stream.","operationId":"Court.createChangeStream__post_courts_change-stream","parameters":[{"name":"options","in":"formData","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false},"get":{"tags":["Court"],"summary":"Create a change stream.","operationId":"Court.createChangeStream__get_courts_change-stream","parameters":[{"name":"options","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/entities/{id}/parent":{"get":{"tags":["Entity"],"summary":"Fetches belongsTo relation parent.","operationId":"Entity.prototype.__get__parent","parameters":[{"name":"refresh","in":"query","required":false,"type":"boolean"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Entity"}}},"deprecated":false}},"/entities/{id}/children/{fk}":{"get":{"tags":["Entity"],"summary":"Find a related item by id for children.","operationId":"Entity.prototype.__findById__children","parameters":[{"name":"fk","in":"path","description":"Foreign key for children","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Entity"}}},"deprecated":false},"delete":{"tags":["Entity"],"summary":"Delete a related item by id for children.","operationId":"Entity.prototype.__destroyById__children","parameters":[{"name":"fk","in":"path","description":"Foreign key for children","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false},"put":{"tags":["Entity"],"summary":"Update a related item by id for children.","operationId":"Entity.prototype.__updateById__children","parameters":[{"name":"fk","in":"path","description":"Foreign key for children","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Entity"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Entity"}}},"deprecated":false}},"/entities/{id}/allocations/{fk}":{"get":{"tags":["Entity"],"summary":"Find a related item by id for allocations.","operationId":"Entity.prototype.__findById__allocations","parameters":[{"name":"fk","in":"path","description":"Foreign key for allocations","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false},"delete":{"tags":["Entity"],"summary":"Delete a related item by id for allocations.","operationId":"Entity.prototype.__destroyById__allocations","parameters":[{"name":"fk","in":"path","description":"Foreign key for allocations","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false},"put":{"tags":["Entity"],"summary":"Update a related item by id for allocations.","operationId":"Entity.prototype.__updateById__allocations","parameters":[{"name":"fk","in":"path","description":"Foreign key for allocations","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Allocation"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false}},"/entities/{id}/children":{"get":{"tags":["Entity"],"summary":"Queries children of Entity.","operationId":"Entity.prototype.__get__children","parameters":[{"name":"filter","in":"query","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/Entity"}}}},"deprecated":false},"post":{"tags":["Entity"],"summary":"Creates a new instance in children of this model.","operationId":"Entity.prototype.__create__children","parameters":[{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Entity"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Entity"}}},"deprecated":false},"delete":{"tags":["Entity"],"summary":"Deletes all children of this model.","operationId":"Entity.prototype.__delete__children","parameters":[{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/entities/{id}/children/count":{"get":{"tags":["Entity"],"summary":"Counts children of Entity.","operationId":"Entity.prototype.__count__children","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/entities/{id}/allocations":{"get":{"tags":["Entity"],"summary":"Queries allocations of Entity.","operationId":"Entity.prototype.__get__allocations","parameters":[{"name":"filter","in":"query","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/Allocation"}}}},"deprecated":false},"post":{"tags":["Entity"],"summary":"Creates a new instance in allocations of this model.","operationId":"Entity.prototype.__create__allocations","parameters":[{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Allocation"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false},"delete":{"tags":["Entity"],"summary":"Deletes all allocations of this model.","operationId":"Entity.prototype.__delete__allocations","parameters":[{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/entities/{id}/allocations/count":{"get":{"tags":["Entity"],"summary":"Counts allocations of Entity.","operationId":"Entity.prototype.__count__allocations","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/entities":{"post":{"tags":["Entity"],"summary":"Create a new instance of the model and persist it into the data source.","operationId":"Entity.create","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Entity"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Entity"}}},"deprecated":false},"put":{"tags":["Entity"],"summary":"Update an existing model instance or insert a new one into the data source.","operationId":"Entity.upsert","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Entity"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Entity"}}},"deprecated":false},"get":{"tags":["Entity"],"summary":"Find all instances of the model matched by filter from the data source.","operationId":"Entity.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/Entity"}}}},"deprecated":false}},"/entities/{id}/exists":{"get":{"tags":["Entity"],"summary":"Check whether a model instance exists in the data source.","operationId":"Entity.exists__get_entities_{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"}}},"deprecated":false}},"/entities/{id}":{"head":{"tags":["Entity"],"summary":"Check whether a model instance exists in the data source.","operationId":"Entity.exists__head_entities_{id}","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},"get":{"tags":["Entity"],"summary":"Find a model instance by id from the data source.","operationId":"Entity.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/Entity"}}},"deprecated":false},"delete":{"tags":["Entity"],"summary":"Delete a model instance by id from the data source.","operationId":"Entity.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":["Entity"],"summary":"Update attributes for a model instance and persist it into the data source.","operationId":"Entity.prototype.updateAttributes","parameters":[{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"$ref":"#/definitions/Entity"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Entity"}}},"deprecated":false}},"/entities/findOne":{"get":{"tags":["Entity"],"summary":"Find first instance of the model matched by filter from the data source.","operationId":"Entity.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/Entity"}}},"deprecated":false}},"/entities/update":{"post":{"tags":["Entity"],"summary":"Update instances of the model matched by where from the data source.","operationId":"Entity.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/Entity"}}],"responses":{"200":{"description":"Request was successful","schema":{"description":"The number of instances updated","type":"object"}}},"deprecated":false}},"/entities/count":{"get":{"tags":["Entity"],"summary":"Count instances of the model matched by where from the data source.","operationId":"Entity.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"}}},"deprecated":false}},"/entities/change-stream":{"post":{"tags":["Entity"],"summary":"Create a change stream.","operationId":"Entity.createChangeStream__post_entities_change-stream","parameters":[{"name":"options","in":"formData","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false},"get":{"tags":["Entity"],"summary":"Create a change stream.","operationId":"Entity.createChangeStream__get_entities_change-stream","parameters":[{"name":"options","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/categories/{id}/allocations/{fk}":{"get":{"tags":["Category"],"summary":"Find a related item by id for allocations.","operationId":"Category.prototype.__findById__allocations","parameters":[{"name":"fk","in":"path","description":"Foreign key for allocations","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false},"delete":{"tags":["Category"],"summary":"Delete a related item by id for allocations.","operationId":"Category.prototype.__destroyById__allocations","parameters":[{"name":"fk","in":"path","description":"Foreign key for allocations","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false},"put":{"tags":["Category"],"summary":"Update a related item by id for allocations.","operationId":"Category.prototype.__updateById__allocations","parameters":[{"name":"fk","in":"path","description":"Foreign key for allocations","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Allocation"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false}},"/categories/{id}/allocations":{"get":{"tags":["Category"],"summary":"Queries allocations of Category.","operationId":"Category.prototype.__get__allocations","parameters":[{"name":"filter","in":"query","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/Allocation"}}}},"deprecated":false},"post":{"tags":["Category"],"summary":"Creates a new instance in allocations of this model.","operationId":"Category.prototype.__create__allocations","parameters":[{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Allocation"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false},"delete":{"tags":["Category"],"summary":"Deletes all allocations of this model.","operationId":"Category.prototype.__delete__allocations","parameters":[{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/categories/{id}/allocations/count":{"get":{"tags":["Category"],"summary":"Counts allocations of Category.","operationId":"Category.prototype.__count__allocations","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/categories":{"post":{"tags":["Category"],"summary":"Create a new instance of the model and persist it into the data source.","operationId":"Category.create","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Category"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Category"}}},"deprecated":false},"put":{"tags":["Category"],"summary":"Update an existing model instance or insert a new one into the data source.","operationId":"Category.upsert","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Category"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Category"}}},"deprecated":false},"get":{"tags":["Category"],"summary":"Find all instances of the model matched by filter from the data source.","operationId":"Category.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/Category"}}}},"deprecated":false}},"/categories/{id}/exists":{"get":{"tags":["Category"],"summary":"Check whether a model instance exists in the data source.","operationId":"Category.exists__get_categories_{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"}}},"deprecated":false}},"/categories/{id}":{"head":{"tags":["Category"],"summary":"Check whether a model instance exists in the data source.","operationId":"Category.exists__head_categories_{id}","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},"get":{"tags":["Category"],"summary":"Find a model instance by id from the data source.","operationId":"Category.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/Category"}}},"deprecated":false},"delete":{"tags":["Category"],"summary":"Delete a model instance by id from the data source.","operationId":"Category.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":["Category"],"summary":"Update attributes for a model instance and persist it into the data source.","operationId":"Category.prototype.updateAttributes","parameters":[{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"$ref":"#/definitions/Category"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Category"}}},"deprecated":false}},"/categories/findOne":{"get":{"tags":["Category"],"summary":"Find first instance of the model matched by filter from the data source.","operationId":"Category.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/Category"}}},"deprecated":false}},"/categories/update":{"post":{"tags":["Category"],"summary":"Update instances of the model matched by where from the data source.","operationId":"Category.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/Category"}}],"responses":{"200":{"description":"Request was successful","schema":{"description":"The number of instances updated","type":"object"}}},"deprecated":false}},"/categories/count":{"get":{"tags":["Category"],"summary":"Count instances of the model matched by where from the data source.","operationId":"Category.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"}}},"deprecated":false}},"/categories/change-stream":{"post":{"tags":["Category"],"summary":"Create a change stream.","operationId":"Category.createChangeStream__post_categories_change-stream","parameters":[{"name":"options","in":"formData","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false},"get":{"tags":["Category"],"summary":"Create a change stream.","operationId":"Category.createChangeStream__get_categories_change-stream","parameters":[{"name":"options","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/allocations/{id}/court":{"get":{"tags":["Allocation"],"summary":"Fetches belongsTo relation court.","operationId":"Allocation.prototype.__get__court","parameters":[{"name":"refresh","in":"query","required":false,"type":"boolean"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Court"}}},"deprecated":false}},"/allocations/{id}/entity":{"get":{"tags":["Allocation"],"summary":"Fetches belongsTo relation entity.","operationId":"Allocation.prototype.__get__entity","parameters":[{"name":"refresh","in":"query","required":false,"type":"boolean"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Entity"}}},"deprecated":false}},"/allocations/{id}/parent":{"get":{"tags":["Allocation"],"summary":"Fetches belongsTo relation parent.","operationId":"Allocation.prototype.__get__parent","parameters":[{"name":"refresh","in":"query","required":false,"type":"boolean"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false}},"/allocations/{id}/children/{fk}":{"get":{"tags":["Allocation"],"summary":"Find a related item by id for children.","operationId":"Allocation.prototype.__findById__children","parameters":[{"name":"fk","in":"path","description":"Foreign key for children","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false},"delete":{"tags":["Allocation"],"summary":"Delete a related item by id for children.","operationId":"Allocation.prototype.__destroyById__children","parameters":[{"name":"fk","in":"path","description":"Foreign key for children","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false},"put":{"tags":["Allocation"],"summary":"Update a related item by id for children.","operationId":"Allocation.prototype.__updateById__children","parameters":[{"name":"fk","in":"path","description":"Foreign key for children","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Allocation"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false}},"/allocations/{id}/category":{"get":{"tags":["Allocation"],"summary":"Fetches belongsTo relation category.","operationId":"Allocation.prototype.__get__category","parameters":[{"name":"refresh","in":"query","required":false,"type":"boolean"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Category"}}},"deprecated":false}},"/allocations/{id}/type":{"get":{"tags":["Allocation"],"summary":"Fetches belongsTo relation type.","operationId":"Allocation.prototype.__get__type","parameters":[{"name":"refresh","in":"query","required":false,"type":"boolean"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Type"}}},"deprecated":false}},"/allocations/{id}/status":{"get":{"tags":["Allocation"],"summary":"Fetches belongsTo relation status.","operationId":"Allocation.prototype.__get__status","parameters":[{"name":"refresh","in":"query","required":false,"type":"boolean"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Status"}}},"deprecated":false}},"/allocations/{id}/children":{"get":{"tags":["Allocation"],"summary":"Queries children of Allocation.","operationId":"Allocation.prototype.__get__children","parameters":[{"name":"filter","in":"query","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/Allocation"}}}},"deprecated":false},"post":{"tags":["Allocation"],"summary":"Creates a new instance in children of this model.","operationId":"Allocation.prototype.__create__children","parameters":[{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Allocation"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false},"delete":{"tags":["Allocation"],"summary":"Deletes all children of this model.","operationId":"Allocation.prototype.__delete__children","parameters":[{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/allocations/{id}/children/count":{"get":{"tags":["Allocation"],"summary":"Counts children of Allocation.","operationId":"Allocation.prototype.__count__children","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/allocations":{"post":{"tags":["Allocation"],"summary":"Create a new instance of the model and persist it into the data source.","operationId":"Allocation.create","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Allocation"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false},"put":{"tags":["Allocation"],"summary":"Update an existing model instance or insert a new one into the data source.","operationId":"Allocation.upsert","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Allocation"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false},"get":{"tags":["Allocation"],"summary":"Find all instances of the model matched by filter from the data source.","operationId":"Allocation.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/Allocation"}}}},"deprecated":false}},"/allocations/{id}/exists":{"get":{"tags":["Allocation"],"summary":"Check whether a model instance exists in the data source.","operationId":"Allocation.exists__get_allocations_{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"}}},"deprecated":false}},"/allocations/{id}":{"head":{"tags":["Allocation"],"summary":"Check whether a model instance exists in the data source.","operationId":"Allocation.exists__head_allocations_{id}","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},"get":{"tags":["Allocation"],"summary":"Find a model instance by id from the data source.","operationId":"Allocation.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/Allocation"}}},"deprecated":false},"delete":{"tags":["Allocation"],"summary":"Delete a model instance by id from the data source.","operationId":"Allocation.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":["Allocation"],"summary":"Update attributes for a model instance and persist it into the data source.","operationId":"Allocation.prototype.updateAttributes","parameters":[{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"$ref":"#/definitions/Allocation"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false}},"/allocations/findOne":{"get":{"tags":["Allocation"],"summary":"Find first instance of the model matched by filter from the data source.","operationId":"Allocation.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/Allocation"}}},"deprecated":false}},"/allocations/update":{"post":{"tags":["Allocation"],"summary":"Update instances of the model matched by where from the data source.","operationId":"Allocation.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/Allocation"}}],"responses":{"200":{"description":"Request was successful","schema":{"description":"The number of instances updated","type":"object"}}},"deprecated":false}},"/allocations/count":{"get":{"tags":["Allocation"],"summary":"Count instances of the model matched by where from the data source.","operationId":"Allocation.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"}}},"deprecated":false}},"/allocations/change-stream":{"post":{"tags":["Allocation"],"summary":"Create a change stream.","operationId":"Allocation.createChangeStream__post_allocations_change-stream","parameters":[{"name":"options","in":"formData","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false},"get":{"tags":["Allocation"],"summary":"Create a change stream.","operationId":"Allocation.createChangeStream__get_allocations_change-stream","parameters":[{"name":"options","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/types/{id}/allocations/{fk}":{"get":{"tags":["Type"],"summary":"Find a related item by id for allocations.","operationId":"Type.prototype.__findById__allocations","parameters":[{"name":"fk","in":"path","description":"Foreign key for allocations","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false},"delete":{"tags":["Type"],"summary":"Delete a related item by id for allocations.","operationId":"Type.prototype.__destroyById__allocations","parameters":[{"name":"fk","in":"path","description":"Foreign key for allocations","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false},"put":{"tags":["Type"],"summary":"Update a related item by id for allocations.","operationId":"Type.prototype.__updateById__allocations","parameters":[{"name":"fk","in":"path","description":"Foreign key for allocations","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Allocation"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false}},"/types/{id}/allocations":{"get":{"tags":["Type"],"summary":"Queries allocations of Type.","operationId":"Type.prototype.__get__allocations","parameters":[{"name":"filter","in":"query","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/Allocation"}}}},"deprecated":false},"post":{"tags":["Type"],"summary":"Creates a new instance in allocations of this model.","operationId":"Type.prototype.__create__allocations","parameters":[{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Allocation"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false},"delete":{"tags":["Type"],"summary":"Deletes all allocations of this model.","operationId":"Type.prototype.__delete__allocations","parameters":[{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/types/{id}/allocations/count":{"get":{"tags":["Type"],"summary":"Counts allocations of Type.","operationId":"Type.prototype.__count__allocations","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/types":{"post":{"tags":["Type"],"summary":"Create a new instance of the model and persist it into the data source.","operationId":"Type.create","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Type"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Type"}}},"deprecated":false},"put":{"tags":["Type"],"summary":"Update an existing model instance or insert a new one into the data source.","operationId":"Type.upsert","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Type"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Type"}}},"deprecated":false},"get":{"tags":["Type"],"summary":"Find all instances of the model matched by filter from the data source.","operationId":"Type.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/Type"}}}},"deprecated":false}},"/types/{id}/exists":{"get":{"tags":["Type"],"summary":"Check whether a model instance exists in the data source.","operationId":"Type.exists__get_types_{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"}}},"deprecated":false}},"/types/{id}":{"head":{"tags":["Type"],"summary":"Check whether a model instance exists in the data source.","operationId":"Type.exists__head_types_{id}","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},"get":{"tags":["Type"],"summary":"Find a model instance by id from the data source.","operationId":"Type.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/Type"}}},"deprecated":false},"delete":{"tags":["Type"],"summary":"Delete a model instance by id from the data source.","operationId":"Type.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":["Type"],"summary":"Update attributes for a model instance and persist it into the data source.","operationId":"Type.prototype.updateAttributes","parameters":[{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"$ref":"#/definitions/Type"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Type"}}},"deprecated":false}},"/types/findOne":{"get":{"tags":["Type"],"summary":"Find first instance of the model matched by filter from the data source.","operationId":"Type.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/Type"}}},"deprecated":false}},"/types/update":{"post":{"tags":["Type"],"summary":"Update instances of the model matched by where from the data source.","operationId":"Type.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/Type"}}],"responses":{"200":{"description":"Request was successful","schema":{"description":"The number of instances updated","type":"object"}}},"deprecated":false}},"/types/count":{"get":{"tags":["Type"],"summary":"Count instances of the model matched by where from the data source.","operationId":"Type.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"}}},"deprecated":false}},"/types/change-stream":{"post":{"tags":["Type"],"summary":"Create a change stream.","operationId":"Type.createChangeStream__post_types_change-stream","parameters":[{"name":"options","in":"formData","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false},"get":{"tags":["Type"],"summary":"Create a change stream.","operationId":"Type.createChangeStream__get_types_change-stream","parameters":[{"name":"options","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/statuses/{id}/allocations/{fk}":{"get":{"tags":["Status"],"summary":"Find a related item by id for allocations.","operationId":"Status.prototype.__findById__allocations","parameters":[{"name":"fk","in":"path","description":"Foreign key for allocations","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false},"delete":{"tags":["Status"],"summary":"Delete a related item by id for allocations.","operationId":"Status.prototype.__destroyById__allocations","parameters":[{"name":"fk","in":"path","description":"Foreign key for allocations","required":true,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false},"put":{"tags":["Status"],"summary":"Update a related item by id for allocations.","operationId":"Status.prototype.__updateById__allocations","parameters":[{"name":"fk","in":"path","description":"Foreign key for allocations","required":true,"type":"string","format":"JSON"},{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Allocation"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false}},"/statuses/{id}/allocations":{"get":{"tags":["Status"],"summary":"Queries allocations of Status.","operationId":"Status.prototype.__get__allocations","parameters":[{"name":"filter","in":"query","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/Allocation"}}}},"deprecated":false},"post":{"tags":["Status"],"summary":"Creates a new instance in allocations of this model.","operationId":"Status.prototype.__create__allocations","parameters":[{"name":"data","in":"body","required":false,"schema":{"$ref":"#/definitions/Allocation"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Allocation"}}},"deprecated":false},"delete":{"tags":["Status"],"summary":"Deletes all allocations of this model.","operationId":"Status.prototype.__delete__allocations","parameters":[{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/statuses/{id}/allocations/count":{"get":{"tags":["Status"],"summary":"Counts allocations of Status.","operationId":"Status.prototype.__count__allocations","parameters":[{"name":"where","in":"query","description":"Criteria to match model instances","required":false,"type":"string","format":"JSON"},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/statuses":{"post":{"tags":["Status"],"summary":"Create a new instance of the model and persist it into the data source.","operationId":"Status.create","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Status"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Status"}}},"deprecated":false},"put":{"tags":["Status"],"summary":"Update an existing model instance or insert a new one into the data source.","operationId":"Status.upsert","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$ref":"#/definitions/Status"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Status"}}},"deprecated":false},"get":{"tags":["Status"],"summary":"Find all instances of the model matched by filter from the data source.","operationId":"Status.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/Status"}}}},"deprecated":false}},"/statuses/{id}/exists":{"get":{"tags":["Status"],"summary":"Check whether a model instance exists in the data source.","operationId":"Status.exists__get_statuses_{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"}}},"deprecated":false}},"/statuses/{id}":{"head":{"tags":["Status"],"summary":"Check whether a model instance exists in the data source.","operationId":"Status.exists__head_statuses_{id}","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},"get":{"tags":["Status"],"summary":"Find a model instance by id from the data source.","operationId":"Status.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/Status"}}},"deprecated":false},"delete":{"tags":["Status"],"summary":"Delete a model instance by id from the data source.","operationId":"Status.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":["Status"],"summary":"Update attributes for a model instance and persist it into the data source.","operationId":"Status.prototype.updateAttributes","parameters":[{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"$ref":"#/definitions/Status"}},{"name":"id","in":"path","description":"PersistedModel id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Status"}}},"deprecated":false}},"/statuses/findOne":{"get":{"tags":["Status"],"summary":"Find first instance of the model matched by filter from the data source.","operationId":"Status.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/Status"}}},"deprecated":false}},"/statuses/update":{"post":{"tags":["Status"],"summary":"Update instances of the model matched by where from the data source.","operationId":"Status.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/Status"}}],"responses":{"200":{"description":"Request was successful","schema":{"description":"The number of instances updated","type":"object"}}},"deprecated":false}},"/statuses/count":{"get":{"tags":["Status"],"summary":"Count instances of the model matched by where from the data source.","operationId":"Status.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"}}},"deprecated":false}},"/statuses/change-stream":{"post":{"tags":["Status"],"summary":"Create a change stream.","operationId":"Status.createChangeStream__post_statuses_change-stream","parameters":[{"name":"options","in":"formData","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false},"get":{"tags":["Status"],"summary":"Create a change stream.","operationId":"Status.createChangeStream__get_statuses_change-stream","parameters":[{"name":"options","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/people/{id}/accessTokens/{fk}":{"get":{"tags":["Person"],"summary":"Find a related item by id for accessTokens.","operationId":"Person.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":["Person"],"summary":"Delete a related item by id for accessTokens.","operationId":"Person.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":["Person"],"summary":"Update a related item by id for accessTokens.","operationId":"Person.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}},"/people/{id}/accessTokens":{"get":{"tags":["Person"],"summary":"Queries accessTokens of Person.","operationId":"Person.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":["Person"],"summary":"Creates a new instance in accessTokens of this model.","operationId":"Person.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":["Person"],"summary":"Deletes all accessTokens of this model.","operationId":"Person.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}},"/people/{id}/accessTokens/count":{"get":{"tags":["Person"],"summary":"Counts accessTokens of Person.","operationId":"Person.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"}}},"deprecated":false}},"/people":{"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":{"$ref":"#/definitions/Person"}}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Person"}}},"deprecated":false},"put":{"tags":["Person"],"summary":"Update an existing model instance or insert a new one into the data source.","operationId":"Person.upsert","parameters":[{"name":"data","in":"body","description":"Model instance data","required":false,"schema":{"$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","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"array","items":{"$ref":"#/definitions/Person"}}}},"deprecated":false}},"/people/{id}/exists":{"get":{"tags":["Person"],"summary":"Check whether a model instance exists in the data source.","operationId":"Person.exists__get_people_{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"}}},"deprecated":false}},"/people/{id}":{"head":{"tags":["Person"],"summary":"Check whether a model instance exists in the data source.","operationId":"Person.exists__head_people_{id}","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},"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","required":false,"type":"string","format":"JSON"}],"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},"put":{"tags":["Person"],"summary":"Update attributes for a model instance and persist it into the data source.","operationId":"Person.prototype.updateAttributes","parameters":[{"name":"data","in":"body","description":"An object of model property name/value pairs","required":false,"schema":{"$ref":"#/definitions/Person"}},{"name":"id","in":"path","description":"User id","required":true,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Person"}}},"deprecated":false}},"/people/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","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"$ref":"#/definitions/Person"}}},"deprecated":false}},"/people/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":{"$ref":"#/definitions/Person"}}],"responses":{"200":{"description":"Request was successful","schema":{"description":"The number of instances updated","type":"object"}}},"deprecated":false}},"/people/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"}}},"deprecated":false}},"/people/change-stream":{"post":{"tags":["Person"],"summary":"Create a change stream.","operationId":"Person.createChangeStream__post_people_change-stream","parameters":[{"name":"options","in":"formData","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false},"get":{"tags":["Person"],"summary":"Create a change stream.","operationId":"Person.createChangeStream__get_people_change-stream","parameters":[{"name":"options","in":"query","required":false,"type":"string","format":"JSON"}],"responses":{"200":{"description":"Request was successful","schema":{"type":"object"}}},"deprecated":false}},"/people/login":{"post":{"tags":["Person"],"summary":"Login a user with username/email and password.","operationId":"Person.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}},"/people/logout":{"post":{"tags":["Person"],"summary":"Logout a user with access token.","operationId":"Person.logout","parameters":[],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}},"/people/confirm":{"get":{"tags":["Person"],"summary":"Confirm a user registration with email verification token.","operationId":"Person.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}},"/people/reset":{"post":{"tags":["Person"],"summary":"Reset password for a user with email.","operationId":"Person.resetPassword","parameters":[{"name":"options","in":"body","required":true,"schema":{"type":"object"}}],"responses":{"204":{"description":"Request was successful"}},"deprecated":false}}},"definitions":{"x-any":{"properties":{}},"Court":{"properties":{"title":{"type":"string"},"sectors":{"type":"number","format":"double"},"public":{"type":"boolean"},"id":{"type":"number","format":"double"},"placeId":{"type":"number","format":"double"}},"required":["title","sectors","public"],"additionalProperties":false},"Place":{"properties":{"title":{"type":"string"},"code":{"type":"string"},"address":{"type":"string"},"landline":{"type":"string"},"mobile":{"type":"string"},"location":{"$ref":"#/definitions/GeoPoint"},"id":{"type":"number","format":"double"}},"required":["title","code"],"additionalProperties":false},"Entity":{"properties":{"ico":{"type":"string"},"address":{"type":"string"},"web":{"type":"string"},"title":{"type":"string"},"private":{"default":false,"type":"boolean"},"color":{"type":"string"},"id":{"type":"number","format":"double"},"parentId":{"type":"number","format":"double"}},"required":["title"],"additionalProperties":false},"Allocation":{"properties":{"begin":{"type":"string","format":"date"},"end":{"type":"string","format":"date"},"id":{"type":"number","format":"double"},"courtId":{"type":"number","format":"double"},"entityId":{"type":"number","format":"double"},"parentId":{"type":"number","format":"double"},"categoryId":{"type":"number","format":"double"},"typeId":{"type":"number","format":"double"},"statusId":{"type":"number","format":"double"}},"additionalProperties":false},"Category":{"properties":{"title":{"type":"string"},"code":{"type":"string"},"id":{"type":"number","format":"double"}},"required":["title","code"],"additionalProperties":false},"Type":{"properties":{"title":{"type":"string"},"id":{"type":"number","format":"double"}},"required":["title"],"additionalProperties":false},"Status":{"properties":{"note":{"type":"string"},"title":{"type":"string"},"id":{"type":"number","format":"double"}},"required":["title"],"additionalProperties":false},"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},"Person":{"properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"landline":{"type":"string"},"mobile":{"type":"string"},"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":["firstName","lastName","email"],"additionalProperties":false},"GeoPoint":{"properties":{"lat":{"type":"number"},"lng":{"type":"number"}}}},"tags":[{"name":"Place"},{"name":"Court"},{"name":"Entity"},{"name":"Category"},{"name":"Allocation"},{"name":"Type"},{"name":"Status"},{"name":"Person"}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment