Comments (5)
You will have to update the api.yaml because there is no id in the response of this route. But it could be interesting to have the same object for this route and the /services route. What do you think ?
from road2.
@lgrd There is no id
in serviceConfiguration
response in api.yml for now, I have to add it to have the correct response for /services
route. Also, I started to implement this new route with the same object so /services/:service
will also have an id
.
Does it look good for you ?
from road2.
Oh ! I got the point...
Now, you have this in the yaml :
200:
description: "successful operation"
content:
application/json:
schema:
type: "array"
items:
type: "object"
allOf:
- type: "object"
properties:
id:
type: "string"
- $ref: "#/components/schemas/serviceConfiguration"
This is because, when you POST or PATCH a service, you will not give the id inside the body. It is only inside the URL parameter.
That's why I add it only in the response of /services. So, to be in line with the other /service/{serviceId}, let us keep the api.yaml like it is.
So, in your code section, you can only read the content of service.json and return it. You don't have to add the id.
Is that ok for you ?
from road2.
Sorry I did not see that id
was added outside serviceConfiguration
in /services
. So yes I will update my branch to only return serviceConfiguration
without id
.
from road2.
thanks ! I will test your code tomorrow but it looks good ! ;)
from road2.
Related Issues (20)
- [fix] add async keyword to administrator.getServicesConfigurations() HOT 2
- [feat] Object storage of configuration
- [feat] /sources implementation
- [feat] /resources implementation
- [fix] Analyse memory issues
- [doc] Translate code documentation in english
- [feat] Add all OSRM features
- [feat] /services/{service}/projections/{projection} implementation (1/2)
- [feat] GET /services/{service}/projections/{projection} implementation (2/2)
- [feat] /projections implementation
- [feat] /services implementation
- [fix] Update error possibilities on the admin API
- [doc] Translate documentation in english
- [github] Move on YAML issue form
- [github] Add a code of conduct
- [github] Add contributing docs
- Add swagger-ui route for apis HOT 1
- [feat] Expose native OSRM and Valhalla APIs HOT 4
- [fix] Disconnect all sources (so bases) during a restart
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 road2.