03echo-mixed

command
v0.0.0-...-93a1306 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

README


title: Sample API version: 0.0.0

Sample API

paths

endpoint operationId tags summary
GET /users main.ListUsers main ListUsers returns a list of users.
POST /users main.InsertUser main InsertUser inserts user.
GET /users/{userId} main.GetUser main GetUser returns user

main.ListUsers GET /users

ListUsers returns a list of users.

name value
operationId main.ListUsers
endpoint GET /users
input Input
output []UserAPIError
tags main
output (application/json)
// GET /users (200)
type Output200 []struct {	// User
	id integer

	// for go-playground/validator
	name string
}

// GET /users (default)
// default error
type OutputDefault struct {	// APIError
	message string

	details map[string]struct {	// FieldError
		path string

		message string
	}
}
description

ListUsers returns a list of users.

main.InsertUser POST /users

InsertUser inserts user.

name value
operationId main.InsertUser
endpoint POST /users
input Input[ User ]
output UserAPIError
tags main
input (application/json)
// POST /users
type Input struct {
	JSONBody struct {	// User
		id integer

		// for go-playground/validator
		name string
	}
}
output (application/json)
// POST /users (200)
type Output200 struct {	// User
	id integer

	// for go-playground/validator
	name string
}

// POST /users (default)
// default error
type OutputDefault struct {	// APIError
	message string

	details map[string]struct {	// FieldError
		path string

		message string
	}
}
description

InsertUser inserts user.

main.GetUser GET /users/{userId}

GetUser returns user

name value
operationId main.GetUser
endpoint GET /users/{userId}
input Input
output UserAPIError
tags main
input (application/json)
// GET /users/{userId}
type Input struct {
	userId integer `in:"path"`
}
output (application/json)
// GET /users/{userId} (200)
type Output200 struct {	// User
	id integer

	// for go-playground/validator
	name string
}

// GET /users/{userId} (default)
// default error
type OutputDefault struct {	// APIError
	message string

	details map[string]struct {	// FieldError
		path string

		message string
	}
}
description

GetUser returns user


schemas

name summary
APIError
FieldError
User

APIError

type APIError struct {
	message string

	details map[string]struct {	// FieldError
		path string

		message string
	}
}

FieldError

type FieldError struct {
	path string

	message string
}

User

type User struct {
	id integer

	// for go-playground/validator
	name string
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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