Hacker Newsnew | past | comments | ask | show | jobs | submit | raverbashing's commentslogin

REST + Swagger I'd say

Swagger is critical. The graphql schema.json is very very good at helping ai's figure out how to use the service. Swagger evens that advantage.

How does Swagger help with REST though? By design, REST supports schemas and is self documenting, Swagger seems redundant.

Why would you need Swagger with REST?

Why would anyone need docs.

REST is self documenting.

Edit: for down voters, I'd be curious why.


Not one of the downvoters, but I'd guess it's because this is only true with HATEOAS which is the part that 99% of teams ignore when implementing "REST" APIs. The downvoters may not have even known that's what you were talking about. When people say REST they almost never mean HATEOAS even though they were explicitly intended to go together. Today "REST" just means "we'll occasionally use a verb other than GET and POST, and sometimes we'll put an argument in the path instead of the query string" and sometimes not even that much. If you're really doing RPC and calling it REST, then you need something to document all the endpoints because the endpoints are no longer self-documenting.

But that is roughly the point here. If we still used REST we wouldn't need swagger, openapi, graphql (for documentation at least, it has other benefits), etc.

We solved the problem of discovery and documentation between machines decades ago. LLMs can and should be using that today instead of us reinventing bandaids yet again.


HATEOAS won't give you the basic nouns on which to work with

Right, you wouldn't need HTML at all for LLMs though. REST would work really well, self a documenting and discoverable is all we really need.

What we find ourselves doing, apparently, is bolting together multiple disparate tools and/or specs to try to accomplish the same goal.


I didn't downvote, but I'm thinking that you need endpoint discovery, bucket types, etc. Sure you could write a 1 page document describing the buckets at the root level, the relationships of the objects, etc., but why not let swagger do that for you at compile time?

I'm talking about actual REST here though, not RPC. Endpoint discover and typed schemas are core pieces of REST, we don't need Swagger or similar to fill in those gaps.

> 2024 floods in Valencia; a partially preventable tragedy, followed by a whole lot of mud slinging

sigh

Of course you're right


Yeah for every HN user complaining about it there are hundreds of people sideloading apps (not realizing what they're doing - under promise of loans or other advantages) and then getting their phone ransomed

For every person getting ransomed by a sideloaded app there are ten people getting ransomed by apps they installed from the Play Store.

And for every person getting scammed by an app from any source, there are a thousand people getting scammed just through phonecalls. Scam apps isn't a real problem at scale, it's a bunch of fear mongering.

And two wrongs don't make a right

If we ban sideloaded apps under this reasoning, we have to ban the Play Store as well, ten times more urgently.

> as it's been implemented as opt-in on WhatsApp's side

Chatting with anyone has always been opt in from the point of the receiver, so I don't get your point?


It is amazing the amount of bs and grasping at straws that the oil company will push to keep their amazing polluting stuff going on

No I'm sure fracking and pipelines and all the crap the oil industry needs just to exist does not have any pfas or micro plastics


Micro plastics pollution is a relatively new problem and thus many direct and indirect effects are not yet fully understood. Moving emissions from CO2 (gas) to micro particles (solid), means emissions will be deposited more local to roads. Moving emissions from 'big oil' installations to the road, means more local emissions/deposits nearer to your home and backyard.

Additionally, due to the fourth power law [0], you only need 20% weight increase to obtain a 2x road wear. Asphalt/concrete production is also accompanied with substantial emission, although progress is made to reduce it [1].

Is there a break-even for weight vs emission reduction? And if so, is it somewhere between personal and cargo vehicles or is it 'EV always better'?

Are we trading 'well-known and bad for global environment'-emission for 'poorly-understood and possibly very bad for local environment on a global scale'-emission?

Of course, with the available information EVs seem to be the better solution, but it should not prevent us from researching/solving unknown effects or being careful choosing a single solution on such a large scale.

[0] https://en.wikipedia.org/wiki/Fourth_power_law

[1] https://www.pbl.nl/uploads/default/downloads/pbl-2022-decarb...


> A 1988 report by the Australian Road Research Board stated that the rule is a good approximation for rutting damage, but an exponent of 2 (rather than 4) is more appropriate to estimate fatigue cracking.

> The accuracy of the law of the fourth power is disputed among experts, since the test results depend on many other factors, such as climatic conditions, in addition to the factors mentioned above.

It's incredible one agency in the '50s did some small limited tests and everyone will parrot it as if it's tablets handed down from God.


"The oil companies! The oil companies!". Yeah, they only lie, nobody needs their products! We all hate it! Buy a car from a good company with honest leadership, like Tesla (made of oil products)!

It's also the "default" in Windows 11 to require a recovery bitlocker key every time you do a minor modification to the "bios" like changing the boot order

Ah but you see, chip cards were a French invention so obviously the US is going to turn their head from it and pretend it doesn't exist for more than 20 yrs

Yes it's "fake till you make it" without the making part

But if you repeat the idea as your own so it becomes

(Yes the president can't tell Greenland from Iceland, but neither half of those "tech bros" who failed geography at school


Yeah but honestly VSCode with Github copilot plugin works in a similar way. Might not be as good but it works

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: