alexjomin / openapi-parser

Simple and still naive openapi documentation generator from comments of your Go code.
18 stars 8 forks source link

fix: custom type should appear as their parent type if possible #29

Closed denouche closed 4 years ago

denouche commented 4 years ago

For custom types like:

type JobState string

For now the generated field looks like:

state:
          $ref: '#/components/schemas/JobState'

This PR make the field looks like:

state:
          type: string
denouche commented 4 years ago

cc @Sadzeih if you have time to take a look...

Sadzeih commented 4 years ago

That looks good, but it would be cool to have some tests. If you don't have time maybe I can write some.

Sadzeih commented 4 years ago

Could we get this PR approved and merged?

denouche commented 4 years ago

Oh, I just merged this one but I see in #32 you are talking about this? So this feature was also included in #32 @Sadzeih ? So I can revert this PR maybe?

Sadzeih commented 4 years ago

Yes I found a better way to deal with this that also works with what I implemented in #32. I don't think we need this PR anymore.