feat: add more rfc api fields (many stubs) #8492
Open
+75
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the extra fields requested here. Many of these are empty stubs, and a couple have more structure than the mock implementation. This is intended as an incremental step to allow progress on the rfced-www client side, not a finished piece of the server-side API. I'm expecting there'll be some iteration (either in this PR or in later updates) on the format / data included in this API call.
The
is_also
field (here, always an empty list) uses the historic "bad" name that represents "is-in-a-subseries-document". That will need to be implemented and given a more appropriate name.Some other pieces can't or shouldn't be implemented yet. The "keywords" and "see also" fields don't (afaik) exist in the datatracker yet, so there's no data to include. The "formats" field could probably be implemented, but it'd currently mean doing a whole lot of looking at the file system and will be changing with the blob store work.
I'm not sure how to represent "errata" at this point, or whether it's needed at the index level.
The
draft
field will probably need some optimization - I haven't profiled, but I suspect it's generating N+1 queries to look up the draft name/title. That can easily be fixed with some prefetching, but I'm holding off until we know what it really need to include in the response.Generally speaking, I continue to worry a bit about providing an API call that potentially includes large amounts of data about large numbers of documents. If there are fields here that could be moved to the detail views instead of the index views (i.e., are only needed for a single RFC view, not for the search results / index page), that would be a good thing to keep in mind.