I have some endpoints in my spec like this one:
/v1/auth/phone/login:
post:
summary: 用手机登陆/注册
tags:
- Auth
operationId: LoginByPhone
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LoginWithPhoneRequest'
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/LoginWithPhoneResponse'
If I generate server code it is ok, but when I generate client code oapi-codegen creates structs with Response suffix which causes deduplication of my structs.
Maybe it would be better to make this suffix configurable or change it and other suffix/prefix literals to with _ at the beginning so it would be OperationName_Response?
Initially I wanted to use a custom template, but this suffix is generated by the function.
I have some endpoints in my spec like this one:
If I generate server code it is ok, but when I generate client code
oapi-codegencreates structs withResponsesuffix which causes deduplication of my structs.Maybe it would be better to make this suffix configurable or change it and other suffix/prefix literals to with
_at the beginning so it would beOperationName_Response?Initially I wanted to use a custom template, but this suffix is generated by the function.