alexjomin / openapi-parser

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

fix: issue while parsing map alias #50

Closed 20010930 closed 11 months ago

20010930 commented 11 months ago

Hello,

I had trouble parsing this kind of lines so i dug into the code and i made some change.

// @openapi:schema
type MapStringString map[string]string

I did not saw regression with the: make test

Here was the issue in the openapi.yaml

    MapStringString: null
    Pet:
        PtrStringMapAlias:
          $ref: '#/components/schemas/'

Here is the result

    MapStringString:
      type: object
      additionalProperties:
        type: string
    Pet:
        PtrStringMapAlias:
          $ref: '#/components/schemas/MapStringString'

Thx for your work, Regards, Paul