Tag: swagger-codegen
-
Generating typescript API client from Swagger
When it comes to API Test Frameworks, I prefer to generate code and not to write everything manually. In my current company, we managed to build a Test Framework using swagger-codegen and Java bindings. It was relatively simple to set up a process where we would generate API clients using…
-
Fixing "io.swagger.client.ApiException: Content type "text/plain" is not supported" problem
Let's say we have a endpoint definition in swagger like this : /hello: post: summary: Say hello description: '' operationId: sayHello consumes: - text/plain produces: - application/json parameters: - in: body name: body required: false schema: type: string responses: '200': description: successful operation schema: $ref: '#/definitions/Hello' You…
-
How to pretty print JSON in bash console
Recently i was playing with Swagger Codegen tool and i needed to look at available configuration fields for java language. You can do it easily by running : curl -X GET --header 'Accept: application/json' 'https://generator.swagger.io/api/gen/clients/java' But, as an output, you'll get this : {"…