dburriss / event-feed

A HTTP based event feed for ASP.NET
MIT License
1 stars 1 forks source link

Update contract schema #8

Closed dburriss closed 2 years ago

dburriss commented 2 years ago

I am updating the schema of responses. I wanted to highlight the changes and get some feedback.

HAL like naming

Impact:

Optional features of HAL like CURIE (compact URI), templated, type, are not currently used.

Errors

_linlk actions

Additional endpoints

I propose that an endpoint along the default route api/event-feed/page/{pageNumber} is valid.

The above is very much geared toward "what would an event processing consumer need". An alternative is a more RESTful API.

An open question is whether we want some aliases, then main one for me would be: api/event-feed/page/tail (or last :P ) It gives an easy way to get the last without getting another page first.

dburriss commented 2 years ago

@Grepsy some design questions. What do you think?

Grepsy commented 2 years ago

All the link actions and naming make sense to me, no proposed changes. I like the more RESTful proposal better/feels more natural. The api/event-feed/page/tail also makes sense.

I'm not sure the /pages would require paging, it feels a bit awkward to me, I'm wondering if we can come up with some sort of threshold in response size where this would be necessary. Now that I'm thinking about it, does it make sense to list all pages in a list, or can we get away with just a single metadata-block describing the pages?

Edit: Ah wait, upon reading this again, I realize why you want the /pages to list all pages, to make it more RESTful. In that case I like the first proposal better :-)

dburriss commented 2 years ago

Closed by PR #9