[Bug Report] Decimal columns labeled as string in openapi.json

We are using cloud nocodb with Decimal columns, and using openapi-generator-cli to build autogenerated rust client crates. We use the following command to generate openapi.json for the data API.

curl -H "xc-token: <token>" https://app.nocodb.com/api/v1/db/meta/projects/<project id>/swagger.json

I noticed that decimal columns in nocodb are getting labeled as string in openapi.json served from this endpoint. Unfortunately rust is very strict about types so this makes it so our autogenerated crates panic when trying to read rows from tables that have decimal columns, because they expect to de-serialize a string but find a floating point number instead.

ExampleResponse":{
...
Example column ":{"type":"string"}, 
...
}

Thank you for reporting the issue. Its tracked here.

1 Like

We’ve fixed the issue where decimal columns were showing as string in OpenAPI JSON.

PR: #11766 (merged)

We’ll roll out the fix later today.

1 Like