express-restful-api's People
Forkers
toantd90express-restful-api's Issues
Auth feature
Could not detach router on express when update attribution or model.
Admin pages
Migrate to MongoDB
JSON schema
When HTTP request have x-json-schema, return JSON schema
Validate parent and instance ID existance
Creating API docs automatically
Narrowing fields feature
?fields=name,age
should be response only two fields instead of every data
expand feature
?expand=group,members
Geo location search
Add latlng
to attribute type. format is latitude,longitude
.
Be able to fetch collection filtered by latitude,longitude,radius(m)
.
Here is a example to search Kyoto around 1km.
location=35.5783703,136.6170494,1000
POST should be failed when duplicated id exists
Bulk POST
POST instance to children
if seeds does not have parent as fruits and fruits have seeds as children.
It should be able to POST seeds as children such as below.
POST /fruits/grape/seeds/a
Push specified ID of seed into grape children
DELETE /fruits/grape/seeds
delete grape children
DELETE /fruits/grape/seeds/a
delete specified id from grape children
groupBy feature
Add groupBy
request parameter in collection fetch.
If there is number attribution type, calculate sum and response the amount as field.
Add size
in grouped item.
Here is a example fetched collection without groupBy
{
"items": [
{
"id": "29d3d12",
"name": "sideroad",
"amount": "1000"
},
{
"id": "029234a",
"name": "sideroad",
"amount": "500"
},
{
"id": "8eb23da",
"name": "foobar",
"amount": "100"
}
]
}
Here is a example fetched collection with groupBy=name
{
"items": [
{
"name": "sideroad",
"amount": 1500,
"size": 2
},
{
"name": "foobar",
"amount": 100,
"size": 1
}
]
}
POST should be use JSON protocol
PATCH as not idempotent
Use PATCH method for NOT idempotent update.
URL
PATCH /apis/fruits/apple
Request Body
{ amount: 10 }
Boolean type
wildcard / range search
wildcard
name=*road
range search
createdAt=[2015-12-01,2015-12-05]
File upload feature
next, prev href for collection
Creator Test Code
id should be better to have in linking
{ href: '/companies/aaa', id: 'aaa' }
Validation API
options
{
"person": {
"name": {
"regexp": "^[a-zA-Z 0-9]+$",
"invalid": "Only alphabets number spaces allowed"
},
"age": {
"regexp": "^[0-9]+$",
"invalid": "Only number allowed"
}
}
}
/validation/groups?name=invalid_value&age=unknown
- HTTP Method ( GET )
- Status Code ( 400 or 200 )
Valid
No Response
Invalid
{
"name": "Only alphabets number spaces allowed",
"age": "Only number allowed"
}
Creating POST man JSON automatically
Search Conditions
PUT as create or update
/person/sideroad
client should be specify id to create or update instance.
PUT should be act as idempotent.
PUT for update should be replace all attribution for the data.
Full text search
Be able to change order to fetch collection
orderBy=age:desc,name:asc
Register API attribution by JSON schema
To be able to specify with JSON schema
Be able to have prefix in the URI
Singleton API
separate configuration singleton and collections
singleton only has READ and UPDATE.
singleton does not have CREATE and DELETE.
singleton be able to have a attribute of children, instance
singleton can not have a attribute of parent
Partial Representations
fields=name,age
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.