ogen icon indicating copy to clipboard operation
ogen copied to clipboard

gen: find a better way to deal with names that do not fit the go specification

Open shadowspore opened this issue 2 years ago • 0 comments

Sample schema component:

components:
  schemas:
    12345:
      type: object
      properties:
        test:
          type: string

Generated type:

// Ref: #/components/schemas/12345
type R12345 struct {
	Test OptString "json:\"test\""
}

It would be nice to generate more meaningful name prefixes based on context.

shadowspore avatar Jul 05 '22 19:07 shadowspore