PhilanthropyDataCommons / service

A project for collecting and serving public information associated with grant applications
GNU Affero General Public License v3.0
8 stars 2 forks source link

Unsafe argument of type `any` on `PlatformProviderResponse.data` #1013

Open reefdog opened 2 months ago

reefdog commented 2 months ago

When using the PlatformProviderResponse type, accessing the data property nets ye olde complainte:

Unsafe argument of type any assigned to a parameter of type object.

Here's the line that actually calls the data property: https://github.com/PhilanthropyDataCommons/front-end/blob/3e39eb2f5815dd0de2caf03733d94242475465ef/src/components/DataPlatformProvider/DataPlatformProviderLoader.tsx#L190

Unsure if this should be part of https://github.com/PhilanthropyDataCommons/service/issues/1004 or is separate.

slifty commented 2 months ago

Part of the issue here is that it basically is an any due to the nature of our partial implementation of platform provider data.

I think for this one you should just use a lint disable, and we know we'll be refactoring this functionality / properly implementing it down the line.

What do you think?

reefdog commented 2 months ago

Perfectly fine by me.

reefdog commented 2 months ago

I should close this with the appropriate status!

reefdog commented 2 months ago

@slifty 😮 how do you get credit for closing this as not planned? I thought I did that! Here, I'm gonna steal credit.

reefdog commented 2 months ago

Ohhh, I see now. I changed the drop-down to "Close as not planned" but didn't actually click the Close button. I didn't realize it was a two-step.

This was useful for more than just narcissism.

reefdog commented 2 months ago

@slifty discovered that swagger-codegen incorrectly translates object to any, a problem subsequently fixed in the swagger-codegen fork openapi-generator.

Thus, we can actually reopen this issue and consider it blocked until either swagger-codegen is fixed or we move to openapi-generator for SDK generation.