Remove formdata in swagger-ui

Hi,
we are trying to generate typescript from swagger-ui but get validation errors when running it in https://validator.swagger.io

The error are

“attribute paths.’/bookings/{id}’(put).[Resources].schema is unexpected”

We understand the issue is because of it’s both adding form-data and body parameters from the DTOS.
Can we somehow turn of so it doesnt show the formdata properties in the swagger-ui?
Or something else to be able to add the properties.

We can’t turn of the body generator as we want that, only want to remove form-data.

Regards Kristian

You’d need to modify the returned Open API v2 JSON by using one of the OpenApiFeature Filters, e.g:

Plugins.Add(new OpenApiFeature {
    OperationFilter = (verb, operation) => 
        operation.Parameters.RemoveAll(x => x.In == "...")
});

Out of curiosity why are you trying to generate TypeScript with OpenAPI instead of the cleaner & richer TypeScript DTOs generated from Add TypeScript ServiceStack Reference?

Thx i will try this.
Regarding using the otherway you proposed, I tried that one before but i generates typescript classes but we want to use typescript hooks.

We use this converter

Blockquote
restful-react is able to generate React hooks with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats.