Comments (3)
The paths for the generated http post endpoints have the primary requirement to be unique, secondary requirement to be developer friendly. They do not have the requirement to adhere RESTful design.
We decided to go with paths like shown in the following example. The generated http endpoints will never be visible for developers, as they are internally used in the generated JavaScript client. For debugging purposes it might still be useful to have human readable paths.
service ValueService {
rpc SaveSettingsValue(SaveSettingsValueRequest) returns (SaveSettingsValueResponse) {
option (google.api.http) = {
post: "/api/v0/settings/value-save",
body: "*"
};
};
rpc GetSettingsValue(GetSettingsValueRequest) returns (GetSettingsValueResponse) {
option (google.api.http) = {
post: "/api/v0/settings/value-get",
body: "*"
};
};
rpc ListSettingsValues(ListSettingsValuesRequest) returns (ListSettingsValuesResponse) {
option (google.api.http) = {
post: "/api/v0/settings/values-list",
body: "*"
};
};
}
from ocis-hello.
One drawback of this is, that the returned status codes have to be handled and will probably not be what a developer would expect. E.g. a successful get request in the above style would not return http 200, but http 201.
from ocis-hello.
@refs what's the state of things here currently? The repo has experienced quite some changes I assume
from ocis-hello.
Related Issues (20)
- ocis-hello outdated and greeter API fails with 405 HOT 2
- Runnig ocis-hello from example guide broken HOT 4
- Documentation need update
- Evaluate to use Gogo protobuf
- build issues with crypto/ed25519 dependency HOT 1
- create UI tests HOT 2
- create API tests HOT 2
- Build errors HOT 3
- Error when clicking the button in the ui HOT 1
- Adjust for Phoenix 0.2.6 + solve potential issues HOT 4
- Greet implementation requires a body param which is never given
- Upgrade the micro/cli version
- make generate fails randomly? HOT 1
- Research: use micro gateway instead of self generated web handler
- Write documentation on how to register settings bundles
- Don't use MDNS HOT 1
- document how to write / run UI tests
- fresh install along readme fails to find package grpc-ecosystem/grpc-gateway/protoc-gen-swagger HOT 3
- is it save to remove LDAP for part Running/configuration-with-ocis in in documentation? HOT 5
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.
from ocis-hello.