|
bob dobbs is dead posted:is it surprising? less than one would hope. should they be fed into a wood chipper? yes. this is all i needed to hear. they're also mixing integers as percentages versus floats for representing ratios between 0 and 1, which i just spent three hours banging my head against the desk to figure out. neither value is inherently discrete and they can both have arbitrary precision in theory so i really don't get it.
|
# ? Jan 25, 2023 00:06 |
|
|
# ? Mar 29, 2024 06:08 |
|
Its a Rolex posted:this is all i needed to hear. they're also mixing integers as percentages versus floats for representing ratios between 0 and 1, which i just spent three hours banging my head against the desk to figure out. neither value is inherently discrete and they can both have arbitrary precision in theory so i really don't get it. there was a guy in the grey forums recently claiming that "percentage" was a totally valid way to describe a float from 0 to 1 maybe he's one of your coworkers lol
|
# ? Jan 25, 2023 00:27 |
|
Its a Rolex posted:is it normal to not document an API and instead tell someone to use the inspect element tool to deduce what the JSON you POST is? Well I've had a "professional" of multiple decades say they have never written a JSON schema in their entire career, and they write APIs every day for new customers. Not specifically the "JSON schema", as in any reasonably complete detail of JSON contents that an API produces.
|
# ? Jan 25, 2023 00:28 |
|
i would simply let swagger and swashbuckle handle it
|
# ? Jan 25, 2023 00:41 |
|
MrMoo posted:Well I've had a "professional" of multiple decades say they have never written a JSON schema in their entire career, and they write APIs every day for new customers. Not specifically the "JSON schema", as in any reasonably complete detail of JSON contents that an API produces. I've written a bunch due to job hopping but I'm guessing some of my coworkers who've been at *bigcorp since forever have not written one either, despite writing systems software with a network API for well over a decade the API docs are agreed upon and updated by architects, middle management and product, devs can give feedback at best e: and even the feedback is in the form of a polite post-facto request for consideration at the next weekly API meeting and the API is 100+ pdf pages just for our component, it's not like it's small or anything also it's an internal API there aren't any external clients Private Speech fucked around with this message at 05:41 on Jan 25, 2023 |
# ? Jan 25, 2023 00:43 |
|
Bloody posted:i would simply let swagger and swashbuckle handle it weird names for your interns but ok
|
# ? Jan 25, 2023 01:06 |
|
Its a Rolex posted:is it normal to not document an API and instead tell someone to use the inspect element tool to deduce what the JSON you POST is? thats called REST
|
# ? Jan 25, 2023 01:33 |
|
Its a Rolex posted:they're also mixing integers as percentages versus floats for representing ratios between 0 and 1, which i just spent three hours banging my head against the desk to figure out. neither value is inherently discrete and they can both have arbitrary precision in theory so i really don't get it. thats called JSON
|
# ? Jan 25, 2023 01:35 |
|
we had service definition files that actually worked 20 years ago and we're just now getting around to swagger/openapi docs being somewhat normal, even if not always useful. i cannot believe what these web "developers" have taken from us.
|
# ? Jan 25, 2023 01:42 |
|
I'll take inspectable browser requests over wrong documentation any day (but hopefully those aren't your only two options)
|
# ? Jan 25, 2023 01:50 |
|
Shaggar posted:we had service definition files that actually worked 20 years ago and we're just now getting around to swagger/openapi docs being somewhat normal, even if not always useful. i cannot believe what these web "developers" have taken from us. Are you talking CORBA? I'm convinced that bad firewall culture and IPv4 exhaustion has set us back about a decade, yeah.
|
# ? Jan 25, 2023 02:54 |
|
SOAP
|
# ? Jan 25, 2023 03:13 |
|
inspectable browser requests implies that you have a working example of something using the api and that's already miles ahead of plenty of things i've had to touch.
|
# ? Jan 25, 2023 04:37 |
|
Shaggar posted:we had service definition files that actually worked 20 years ago and we're just now getting around to swagger/openapi docs being somewhat normal, even if not always useful. i cannot believe what these web "developers" have taken from us. every swagger/openapi thing I've seen has been wrong and generated broken poo poo
|
# ? Jan 25, 2023 05:33 |
|
yeah the only ones that work are the .net ones where its generated from your code and all the associated attributes. but even then it doesnt work if your model and service interface designs are bad.
|
# ? Jan 25, 2023 05:41 |
|
application piss interface
|
# ? Jan 25, 2023 05:54 |
|
Shaggar posted:yeah the only ones that work are the .net ones where its generated from your code and all the associated attributes. but even then it doesnt work if your model and service interface designs are bad. java with swagger works just fine with the annotations to build the doc as well with the same caveats you mentioned. oddly enough soap was far easier to build clients with in java since it came packed with wsexport until java 11 removed it.
|
# ? Jan 25, 2023 07:07 |
|
my favourite service definitions are the ones that are just reams of auto generated cruft like "GET /fart => get a fart" with zero actual explanation that when you call turn out to have some internal validation that fails with an http error and no return message
|
# ? Jan 25, 2023 09:49 |
|
soap only ever worked for me if you used the same stuff to generate specs as you did clients swagger OTOH works if you don't use any of the features the spec offers, because almost none are fully supported
|
# ? Jan 25, 2023 10:00 |
|
OpenAPI specs built from code annotations usually miss 90% of the possible return codes, usually miss any examples and are generally there to tick the "we have documentation box" hand-written OpenAPI specs OTOH don't exist, because the spec is terrible to write manually all this because webdevs at some point decided that xml wasn't good, it only took them all this time to realize why they were wrong
|
# ? Jan 25, 2023 10:03 |
|
everything is bad!!! loving piece of poo poo
|
# ? Jan 25, 2023 10:12 |
Carthag Tuek posted:everything is bad!!! loving piece of poo poo
|
|
# ? Jan 25, 2023 10:18 |
xml is.......fine
|
|
# ? Jan 25, 2023 10:18 |
Are you guys talking about java? It's good
|
|
# ? Jan 25, 2023 10:19 |
Java is named after coffee because both java and coffee are good and they power your daily life
|
|
# ? Jan 25, 2023 10:20 |
PokeJoe easily claimes the pentuple
|
|
# ? Jan 25, 2023 10:21 |
PokeJoe posted:PokeJoe easily claimes the pentuple 7/10 no ring
|
|
# ? Jan 25, 2023 10:41 |
|
Sagacity posted:OpenAPI specs built from code annotations usually miss 90% of the possible return codes, usually miss any examples and are generally there to tick the "we have documentation box" i handwrote them for a project once, the problems were: * you had to be careful what features you used, as none of the client generation libs support the same subset * you then have to generate the server controllers (diy, couldn't find anything that did this already) or set up something that ensures your server is in line with the specs (possible without much effort to add to your testing suite but you'll have to work out how)
|
# ? Jan 25, 2023 11:19 |
|
comedy option would be to handwrite the specs but not test them, guaranteeing that your specs always differ from the actual behaviour
|
# ? Jan 25, 2023 11:20 |
|
openapi-typescript can codegen types from a hand-written openapi spec, seems pretty nice to me from the little bit i've played with it. you can also import the jsonized form of your openapi spec as a runtime constant and feed the request payload bits into a json schema validator for request validation.
|
# ? Jan 25, 2023 15:45 |
|
quote:catch(SqlException sex) hehehe visual studio linter posted:the variable "sex" is declared but never used
|
# ? Jan 25, 2023 16:44 |
|
visual studio linter posted:the variable "sex" is declared but never used Powerful Two-Hander posted:hehehe don’t worry, the op wouldn’t have known what to do if it was
|
# ? Jan 25, 2023 17:13 |
|
poemdexter posted:java with swagger works just fine with the annotations to build the doc as well with the same caveats you mentioned. c# attributes are the same thing as java annotations in this context. but of course soap worked far easier cause it was designed so you could always generate a viable client, but swagger generated clients are not always viable cause complex models and return types may not be fully documented or easy do deserialize
|
# ? Jan 25, 2023 17:16 |
|
This is the world REST users want:
|
# ? Jan 25, 2023 17:24 |
|
VikingofRock posted:lol if you're not writing a full gr-based n-body simulation to determine the precise moment of the equinoxes and solstices in the greenwich mean reference frame. just lol any REAL datetime library needs accelerometer access so it can compute boosts
|
# ? Jan 25, 2023 17:31 |
Shaggar posted:This is the world REST users want: actually it's this https://github.com/clouddrove/terraform-aws-api-gateway/blob/master/main.tf
|
|
# ? Jan 25, 2023 17:35 |
|
Shaggar posted:This is the world REST users want: they have played us for absolute fools
|
# ? Jan 25, 2023 17:38 |
|
Shaggar posted:This is the world REST users want:
|
# ? Jan 25, 2023 20:07 |
|
yeah trying to treat http as anything other than a dumb transport has been a failure
|
# ? Jan 25, 2023 20:11 |
|
|
# ? Mar 29, 2024 06:08 |
|
Shaggar posted:This is the world REST users want: lmfao @ reproducing the http specification as method attributes. where are the listings for the other 85 types of http response? its impossible to handle a request unless we list themall
|
# ? Jan 25, 2023 20:19 |