speedruncomorg / api

REST API Documentation for speedrun.com
346 stars 36 forks source link

Unannounced breaking change in `Variable` structure that could lead to fatal errors for API clients #146

Closed exodustx0 closed 2 years ago

exodustx0 commented 2 years ago

Example request.

The {Variable}.values.values.{id} objects are documented to always have properties label, rules and flags. However, in the example request, we can see that only label is defined. Any active code that went with the implication that the flags property would always be defined, as the documentation suggests, would run into a fatal error when trying to access flags.miscellaneous.

Nick-NCSU commented 2 years ago

In your example request it seems that is-subcategory is false. According to the documentation you sent "For non-subcategory values, rules and flags are not defined."

exodustx0 commented 2 years ago

Oh bobbins. I must've totally glossed over that. Deepest apologies!