Coder Social home page Coder Social logo

Confusing payload/body API about fastify HOT 9 CLOSED

fastify avatar fastify commented on July 30, 2024
Confusing payload/body API

from fastify.

Comments (9)

delvedor avatar delvedor commented on July 30, 2024

You are right, body is more intuitive.
In addition, I'm developing the swagger plugin, and in the yaml file the payload is referenced as body.
I'm +1 on rename it, or at least make an alias.

@mcollina thoughts?

from fastify.

mcollina avatar mcollina commented on July 30, 2024

I'm 👍 on fixing the inconsistency. I'm fine both ways.

from fastify.

delvedor avatar delvedor commented on July 30, 2024

The problem with the "remove completely" is that we are not warning the user that we have changed the api. So probably use an alias until the v1.0 is the best way :)

from fastify.

jsumners avatar jsumners commented on July 30, 2024

<1.0.0 is volatile. So if you wanted to change it completely I don't see why you'd need to keep an alias around.

from fastify.

mcollina avatar mcollina commented on July 30, 2024

I'm 👍 in removing it completely right now.

from fastify.

delvedor avatar delvedor commented on July 30, 2024

Ahahaha, we are in democracy, 2 vs 1 :P
Let's go with the direct change then!
@jsumners do you want to make a pr?

from fastify.

jsumners avatar jsumners commented on July 30, 2024

I am unclear on the decided resolution (payload or body). I am fine with you implementing what you see as the solution @delvedor .

from fastify.

delvedor avatar delvedor commented on July 30, 2024

Body :)

Ok, I'll do it, thanks for the suggestion!

from fastify.

delvedor avatar delvedor commented on July 30, 2024

Done in #78

from fastify.

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.