Documentation ¶
Index ¶
- func ToClient(baseClient string, serviceName string, openAPI *oas.OpenAPI) string
- func ToTypes(serviceName string, pkgName string, openAPI *oas.OpenAPI) string
- type OpenAPIOperation
- func (op *OpenAPIOperation) HasRequest() bool
- func (op *OpenAPIOperation) ID() string
- func (op *OpenAPIOperation) Method() string
- func (op *OpenAPIOperation) Path() string
- func (op *OpenAPIOperation) WriteReqType(w io.Writer, importer *codegen.Importer)
- func (op *OpenAPIOperation) WriteRespBodyType(w io.Writer, importer *codegen.Importer)
- type TypeGenerator
- func (g *TypeGenerator) FieldFrom(name string, propSchema *oas.Schema, requiredFields ...string) *common.Field
- func (g *TypeGenerator) PrefixType(tpe string) string
- func (g *TypeGenerator) Type(schema *oas.Schema) (string, bool)
- func (g *TypeGenerator) TypeIndirect(schema *oas.Schema) (string, bool)
- func (g *TypeGenerator) WriteFields(w io.Writer, schema *oas.Schema)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OpenAPIOperation ¶
func OpenAPIOperationFrom ¶
func OpenAPIOperationFrom(serviceName string, method string, path string, operation *oas.Operation, components oas.Components) *OpenAPIOperation
func (*OpenAPIOperation) HasRequest ¶
func (op *OpenAPIOperation) HasRequest() bool
func (*OpenAPIOperation) ID ¶
func (op *OpenAPIOperation) ID() string
func (*OpenAPIOperation) Method ¶
func (op *OpenAPIOperation) Method() string
func (*OpenAPIOperation) Path ¶
func (op *OpenAPIOperation) Path() string
func (*OpenAPIOperation) WriteReqType ¶
func (op *OpenAPIOperation) WriteReqType(w io.Writer, importer *codegen.Importer)
func (*OpenAPIOperation) WriteRespBodyType ¶
func (op *OpenAPIOperation) WriteRespBodyType(w io.Writer, importer *codegen.Importer)
type TypeGenerator ¶
func NewTypeGenerator ¶
func NewTypeGenerator(serviceName string, importer *codegen.Importer) *TypeGenerator
func (*TypeGenerator) PrefixType ¶
func (g *TypeGenerator) PrefixType(tpe string) string
func (*TypeGenerator) TypeIndirect ¶
func (g *TypeGenerator) TypeIndirect(schema *oas.Schema) (string, bool)
func (*TypeGenerator) WriteFields ¶
func (g *TypeGenerator) WriteFields(w io.Writer, schema *oas.Schema)
Click to show internal directories.
Click to hide internal directories.