Giter Site home page Giter Site logo

Comments (9)

alexanderdean avatar alexanderdean commented on July 30, 2024

Just be careful not to assume JSON Schema - remember Iglu will be used for other formats too.

Maybe something like:

/api/schemas/validate/jsonschema/instance=

from iglu.

BenFradet avatar BenFradet commented on July 30, 2024

Very true.

from iglu.

BenFradet avatar BenFradet commented on July 30, 2024

This is done, except for the naming of the query param, but I will do a complete overhaul of the names of the query params soon.

from iglu.

alexanderdean avatar alexanderdean commented on July 30, 2024

Nice one. I wanted to ask about the query params. For a POST (i.e. new resource) in a RESTful world, is it best practice to use a query param for the thing you are posting, or is it better just to make the new resource the post body? What do e.g. Zendesk or Stripe do?

from iglu.

BenFradet avatar BenFradet commented on July 30, 2024

Mostly through the request's body, but for our post requests, both are supported.

from iglu.

alexanderdean avatar alexanderdean commented on July 30, 2024

Yes - I guess the advantage of going through the request's body is that you don't need to come up with a parameter name for the thing being posted, which would vary with the type of resource...

from iglu.

BenFradet avatar BenFradet commented on July 30, 2024

I had a look at the stripe's api (eg https://stripe.com/docs/api#create_refund) and they mostly go through form-like parameters. I think supporting both might still be the way to go.

from iglu.

alexanderdean avatar alexanderdean commented on July 30, 2024

Okay cool

from iglu.

BenFradet avatar BenFradet commented on July 30, 2024

Done in r2, closing.

from iglu.

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.