# README
REST API Server のコード自動生成に関するドキュメント
コードの自動生成
作業は本リポジトリのルートディレクトリで行う
ogen cli のインストール
GOBIN=$(PWD)/bin go install github.com/ogen-go/ogen/cmd/ogen@latest
コードの生成
bin/ogen --target pkg/rest/server -package server --clean api/openapi/dist/swagger.gen.yaml
# Functions
LabelerFromContext retrieves the Labeler from the provided context, if present.
NewClient initializes new Client defined by OAS.
NewServer creates new Server.
WithClient specifies http client to use.
WithErrorHandler specifies error handler to use.
WithMaxMultipartMemory specifies limit of memory for storing file parts.
WithMeterProvider specifies a meter provider to use for creating a meter.
WithMethodNotAllowed specifies Method Not Allowed handler to use.
WithMiddleware specifies middlewares to use.
WithNotFound specifies Not Found handler to use.
WithPathPrefix specifies server path prefix.
WithServerURL sets context key to override server URL.
WithTracerProvider specifies a tracer provider to use for creating a tracer.
# Constants
No description provided by the author
No description provided by the author
# Structs
Client implements OAS client.
Ref: #/components/schemas/CreateUserRequest.
Ref: #/components/schemas/CreateUserRequest_user.
Ref: #/components/schemas/Error.
Ref: #/components/schemas/Error_invalid_params_inner.
GetUserByUsernameParams is parameters of getUserByUsername operation.
Labeler is used to allow adding custom attributes to the server request metrics.
Route is route object.
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
Ref: #/components/schemas/User.
Ref: #/components/schemas/UserResponse.
# Interfaces
ClientOption is client config option.
No description provided by the author
No description provided by the author
Handler handles operations described by OpenAPI v3 specification.
Invoker invokes operations described by OpenAPI v3 specification.
Option is config option.
ServerOption is server config option.
# Type aliases
No description provided by the author
No description provided by the author
ErrorHandler is error handler.
No description provided by the author
No description provided by the author
Middleware is middleware type.
OperationName is the ogen operation name.