inventory

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Openapi = compoas.OAS{
	Openapi: "3.0.0",
	Info: compoas.Info{
		Title:   "Inventory API",
		Version: "1.0.0",
	},
	Components: &compoas.Components{
		Schemas: map[string]compoas.Schema{
			"Product": {Type: "object", Properties: map[string]compoas.Schema{
				"id":   {Type: "integer"},
				"name": {Type: "string"},
			}},
		},
	},
	Paths: map[string]compoas.PathItem{
		"/inventory/product/{id}": {
			Get: &compoas.Operation{
				Tags: []string{"Inventory"},
				Responses: map[string]compoas.Response{
					"200": {Content: map[string]compoas.MediaType{
						"application/json": {Schema: &compoas.Schema{Ref: "#/components/schemas/Product"}},
					}},
					"404": {Description: "Product not found"},
				},
				Parameters: []compoas.Parameter{
					{Name: "id", In: "path", Required: true, Schema: &compoas.Schema{Type: "integer"}},
				},
			},
		},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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