GREsau / okapi

OpenAPI (AKA Swagger) document generation for Rust projects
MIT License
606 stars 110 forks source link

Fix bug about creating the schema of EventStream response #86

Closed codercengiz closed 2 years ago

codercengiz commented 2 years ago

First, I would like to thank you for the EventStream feature that came with the last commit.

I wanted to report a bug I've seen on that subject.

The schema is not added to the JSON file associated with the Event Stream.

"response": {
           "200": {
             "description": "",
             "content": {
               "text/event-stream; charset=utf-8": {}
             }
           }
         },

so, Open Api Generator for typescript-fetch throws an error.

[main] ERROR o.o.codegen.DefaultCodegen - Undefined property/schema for `SchemaFor200ResponseBodyTextEventStream charsetutf8`. Default to type:string.