saferwall / webapis Goto Github PK
View Code? Open in Web Editor NEWThe ๐ Web APIs for Saferwall.
Home Page: https://api.saferwall.com
License: Apache License 2.0
The ๐ Web APIs for Saferwall.
Home Page: https://api.saferwall.com
License: Apache License 2.0
{
"status": 404,
"message": "The requested resource was not found."
}
{
"status": 500,
"message": "We encountered an error while processing your request."
}
(2) response should be same as (1) response
{
"status": 404,
"message": "The requested resource was not found."
}
Authorization using header authorization is very important in any REST API
"There is some problem with the data you submitted."
"Key: 'CreateUserRequest.Username' Error:Field validation for 'Username' failed on the 'alphanum' tag"
/files/sha256?fields=x
always includes comments_count
, we should omit that field./files/sha256?fields=not_exist
return internal error, we should return bad request or something like that.ok
I got an array of one object in the element fields. (items[0])
{
"items" : [{
"asci" : ["abc","efg"],
"xyz":[]
}]
}
It should be one of those:
{
"items" : {
"asci" : ["abc","efg"],
"xyz":[]
}
}
or
{
"items" : [
{ "encoding":"asci", "value":"abc"},
{ "encoding":"asci", "value":"efg"}
]
}
or
{
"items" : [
["asci", "abc"],
[ "asci", "efg"]
]
}
for me I think it is better to choose the 1st one to avoid duplicating the strings, but just to make it object instead of array.
I just noticed that we can only log in using username.
Is there a reason we don't allow logins using the email address?
When a user register an account and log in for the first time, no activity is being displayed which is a bit confusing for the user, as with an anonymous account, we display all activities.
We should display a message to the user to start following some users.
Maybe we should always have a view to recommend some active users to registered accounts.
DELETE /auth/logout/
Can we avoid using new
? because it is a reserved term in most languages.
In the case of a password changing
internal/user/service.go
I think it is better to use new_password
instead of new
.
POST with a valid body and Authorization
header on /v1/comments/
responds with 500 Internal Server Error
with a the body:
{
"status": 500,
"message": "We encountered an error while processing your request."
}
instead of 201 Created
, a subsequent get request to the comments resource shows that the comment did go through.
Go comments endpoint doesn't have the // @Security Bearer
guard, although it's required and would fail with 401 Unauthorized
without it, I generate the typescript API file from the swagger OpenAPI output in docs/swagger.json
using openapi-generator-cli
from npm.
This issue might affect the other comment endpoints with the other methods (DELETE
, UPDATE
, etc)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.