leaderboardsgg / leaderboard-backend

The backend for Leaderboards.gg. Also holds public-facing APIs.
https://info.leaderboards.gg
GNU General Public License v3.0
12 stars 16 forks source link

Non-nullable properties are automatically required in OpenApi spec #143

Closed Dalet closed 1 year ago

Dalet commented 1 year ago

Noticed that although the API spec stopped tagging the non-nullable properties as nullable, it still didn't make them required. There is no built-in way to do this so I borrowed someone's code.

With this, any non-nullable property will be automatically required.

(here "required" means the JSON object will always contain the property)