Skip to content

Conversation

@korylprince
Copy link

This is an initial draft for an enrollments API (see #6).

So far this just includes a storage interface and OpenAPI spec - once these are finalized/agreed upon, I'll work on the implementation.

This API provides just enough query and response fields to be useful, and specifically avoids needing to reparse raw Authenticate, UserAuthenticate, or TokenUpdate bodies in the data store.

Copy link
Member

@jessepeterson jessepeterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Thanks for looking at this! I only have time at the moment to review this specific part (the query input). I'll hopefully get more time to look and think about the others soon!

@korylprince
Copy link
Author

@jessepeterson updated everything based on your suggested changes.

Copy link
Member

@jessepeterson jessepeterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving in the right direction, I think. In general I think I would prefix all structs with EnrollmentsQuery* to solidify all these various structs are part of the same "suite" (save for Pagination — that can be re-used between any other queries).

Encoding the error in an actual HTTP response I'm not sure if I'd wrap the whole result in another structure that embeds the EnrollmentsQueryResult to capture and pass on the error as well as any results. The semantics are different for a REST endpoint vs. using e.g. Go library code.

Co-authored-by: Jesse Peterson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants