botblock / data

Open data for BotBlock.org, consumed for the API worker & website.
Apache License 2.0
11 stars 29 forks source link

Update OpenAPI, list schema and list data to support api_post_method #45

Closed MattIPv4 closed 2 years ago

MattIPv4 commented 2 years ago

With https://github.com/botblock/api-worker/pull/3 now merged, we can introduce support within the data that powers the API for the new api_post_method property.

The OpenAPI schema will need updating to indicate that lists will now return this property. It should be a nullable string.

The list schema will need updating to allow lists to define this string, again also allowing it to be nullable (and defaulting to null).

All existing lists will need to be updated to set this property to null.

A5rocks commented 2 years ago

All existing lists will need to be updated to set this property to null.

Just for clarification -- it can be undefined | null | string, I think. Is it be worth making it always required to remind people of it?

(I volunteer to do the necessary work once this is clarified, along with updating discordlist.gg to use PUT)

MattIPv4 commented 2 years ago

it can be undefined | null | string

I don't think it needs to be undefined? It should be a required field in the schema like all other properties, so should just be null | string?

A5rocks commented 2 years ago

Probably badly phrased my question: I meant more like should it be required? Technically that would be unnecessary.

Sounds like you think it should be though, which is fine.

MattIPv4 commented 2 years ago

Yah, all existing API fields are required but nullable, so I think this should be too.