Time |
S |
Nick |
Message |
04:51 |
|
|
wsieroci joined #rest |
07:23 |
|
|
interop_madness joined #rest |
08:37 |
|
|
Haudegen joined #rest |
08:46 |
|
|
Haudegen joined #rest |
08:57 |
|
mdk |
I'm trying to tell my clients I have a STOMP server so they can get live updates over web-socket if they want, first though is to add a kind of {"href": "ws://…/stomp/the_channel_for_this_objet", "rel": "stomp"} in the "links" attribute, but it looks non-natural, any though? |
09:11 |
|
trygvis |
hm, that looks like something I would have done :) |
09:13 |
|
mdk |
trygvis: for the "rel" attribute, does something like "ws/stomp11" make sense? I mean, we can think of the future, adding other stomp versions / other protocols / whatever? |
09:21 |
|
|
wsieroci joined #rest |
09:38 |
|
|
wsieroci joined #rest |
09:43 |
|
trygvis |
the transport protocol is specified by the url and content type is in the resource you're receiving |
09:47 |
|
mdk |
hum |
09:50 |
|
mdk |
Is there a "REST API schema repository", aggregating json schemas / open API schemas of REST APIs, a bit like https://github.com/SchemaStore/schemastore/tree/master/src/schemas/json but for REST APIs? |
09:51 |
|
mdk |
It may be usefull to look "how what is done by who", or even compute some stats like "this is done like this by 10% of APIs and like this by 90% of APIs" |
09:54 |
|
|
bool joined #rest |
09:58 |
|
bool |
I am trying to understand this stateless thing and have seen that many rest-services requires authentication. isnt storing that a user has logged in on the server storing a state? furthermore I see that they often limit the number of requests a user can make, isn't that also storing state? |
10:04 |
|
trygvis |
each request includes authentication, there is no connection that keeps a state |
10:10 |
|
mdk |
bool: Don't hurt your mind too much with statelessness, your API will probably store some data at some point (like POST /messages/ adding a message to a collection of messages), focus your understanding to the idempotency of requests (that have to be indempotent). For authentification, trygvis make the point right, typically look at basic auth : it works without "creating a session per user", it just |
10:10 |
|
mdk |
retransmits the password every time |
10:11 |
|
mdk |
bool: If you respect idempotency, you'll not be able to use server-side sessions (GET /admin → denied, PUT /create_session → 201, GET /admin → 200!? not idempotent? → bad), that's the "statelessness" you want |
10:18 |
|
bool |
and what about the limit requests per user? isnt that state also? |
10:39 |
|
pdurbin |
mdk: I don't know but if you find a REST API schema repository, please let us know! |
10:48 |
|
trygvis |
bool: no, it is not related to the rest application |
11:06 |
|
bool |
hmm... i think i understand, but should probably browse the web for more examples to let it sink in |
11:06 |
|
bool |
thanks :) |
11:26 |
|
mdk |
still searching a rest schemata repository, I'll tell you if I get something. Or we may build it þ |
11:49 |
|
mdk |
Can start to get some from here https://github.com/search?o=desc&q=%22targetSchema%22+extension%3Ajson&s=indexed&type=Code&utf8=%E2%9C%93 |
13:06 |
|
pdurbin |
mdk: can you tell if a JSON schema file is downloadable from http://schema.org/Dataset ? If it's there I can't find it. |
13:08 |
|
mdk |
pdurbin: dunno, yet I found https://github.com/SchemaStore/schemastore/tree/master/src/schemas/json a few minutes ago there's like 4 schema.org schemas translated to json schema here |
13:11 |
|
pdurbin |
mdk: right, that's the same link you posted previously |
13:12 |
|
mdk |
ah þ |
13:14 |
|
mdk |
pdurbin: it should be possible to translate them automatically, yet very hard as they extensively use inheritance and there is *no* concept of inheritance in json-schema |
13:15 |
|
pdurbin |
mdk: do you think this is what I'm looking for? I guess this may be JSON-LD rather than JSON Schema: https://github.com/schemaorg/schemaorg/blob/sdo-callisto/data/releases/3.2/schema.jsonld#L337 |
13:16 |
|
mdk |
oh, jsonld, long time no see |
13:20 |
|
pdurbin |
heh |
13:31 |
|
mdk |
OK, I found some json schema from APIs : https://dpaste.de/3v1O/raw next step : write a crawler :( |
13:36 |
|
pdurbin |
mdk: long list. How many of these do you plan on using? |
13:38 |
|
mdk |
pdurbin: I just want to analyze the current usage of json-schema : what do people describe with it, and maybe extract some statistics. Not yet sure what and why though, but it should be great to see that for an object named "Person", x percent assign a "firstname" and "lastname" attribut and y percent assign a "name" attribute, and so on… |
13:39 |
|
mdk |
Not telling that "the mass is right" but it may give ideas like "OK I have to describe that, does anyone has already described it? How did he named the property describing yadi yadi yada?" ... |
13:40 |
|
mdk |
It may also be a source of inspiration for non-english peakers trying to find the right vocabulary, etc.. |
13:40 |
|
mdk |
s/peakers/speakers/ |
13:42 |
|
mdk |
I, personally, sometimes struggle to find the right attribute name for a given thing, I don't know like ... a lead for an article, do we name this a "lead", a "article_lead", a "lede", a "lead_paragraph", … (https://en.wikipedia.org/wiki/Lead_paragraph), the right answer is probably "The less surprising one" and to find the "less surprising one", looking at some stats may help |
13:44 |
|
pdurbin |
mdk: here's someone asking for a JSON Schema of our homegrown way of expressing a dataset in JSON: https://groups.google.com/d/msg/dataverse-community/qsY8swD9Hh0/jOAI9UBLAAAJ |
13:45 |
|
pdurbin |
Currently, I don't have a good answer. We don't have a JSON Schema for our somewhat zany JSON format for a dataset. |
13:47 |
|
mdk |
It make me think that wikidata may be a source of inspiration too for attr names |
13:52 |
|
pdurbin |
Well, the reason I'm interested in http://schema.org/Dataset is that it's mentioned at https://developers.google.com/search/docs/data-types/datasets but I guess that's JSON-LD rather than JSON Schema. |
13:53 |
|
|
Haudegen joined #rest |
16:16 |
|
|
wsieroci joined #rest |
17:46 |
|
|
Haudegen joined #rest |
17:57 |
|
|
wsieroci joined #rest |
18:37 |
|
|
wsieroci joined #rest |
19:14 |
|
|
wsieroci joined #rest |