v1

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/nazirok/oapi-codegen version (devel) DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type Person

type Person struct {
	// Embedded struct due to allOf(#/components/schemas/PersonProperties)
	PersonProperties `yaml:",inline"`
}

Person defines model for Person.

type PersonProperties

type PersonProperties struct {
	FirstName          *string `json:"FirstName,omitempty"`
	GovernmentIDNumber *int64  `json:"GovernmentIDNumber,omitempty"`
	LastName           *string `json:"LastName,omitempty"`
}

PersonProperties These are fields that specify a person. They are all optional, and would be used by an `Edit` style API endpoint, where each is optional.

type PersonWithID

type PersonWithID struct {
	// Embedded struct due to allOf(#/components/schemas/Person)
	Person `yaml:",inline"`
	// Embedded fields due to inline allOf schema
	ID int64 `json:"ID"`
}

PersonWithID defines model for PersonWithID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL