discord-gophers / goapi-gen

This package contains a set of utilities for generating Go boilerplate code for services based on OpenAPI 3.0 API definitions
Apache License 2.0
137 stars 12 forks source link

Proposal: Allow ",string" in JSON #77

Closed diamondburned closed 2 years ago

diamondburned commented 2 years ago

There should be a new attribute x-go-json-string: true attribute that makes the code generator output a json:"field_name,string" tag instead of json:"field_name".

This is particularly useful for ID types without having to implement UnmarshalJSON() and MarshalJSON() methods.

Karitham commented 2 years ago

fixed by #82