Git Product home page Git Product logo

Comments (5)

lgrd avatar lgrd commented on June 16, 2024

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.

benoitblanc avatar benoitblanc commented on June 16, 2024

@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.

lgrd avatar lgrd commented on June 16, 2024

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.

benoitblanc avatar benoitblanc commented on June 16, 2024

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.

lgrd avatar lgrd commented on June 16, 2024

thanks ! I will test your code tomorrow but it looks good ! ;)

from road2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.