d02markdown-with-wrapper

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: 12 Imported by: 0

README


title: Swagger Petstore version: 1.0.0

Swagger Petstore

A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification

paths

endpoint operationId tags summary
GET /users main.ListUser main
GET /users/{id} main.GetUser main get user

main.ListUser GET /users

name value
operationId main.ListUser (source)
endpoint GET /users
input Input
output Pagination[[]User]Error
tags main
output (application/json)
// GET /users (200)
type Output200 struct {	// Pagination[main.User]
	hasMore boolean	// default: false

	items []struct {	// User
		// Name of the user
		name string

		// Age of the user
		age? integer
	}
}

// GET /users (default)
// default error
type OutputDefault struct {	// Error
	// Error code
	code integer `format:"int32"`

	// Error message
	message string
}

examples


// GET /users (default)

{
  "code": 444,
  "message": "unexpected error!"
}

main.GetUser GET /users/{id}

get user

name value
operationId main.GetUser (source)
endpoint GET /users/{id}
input Input
output GetUserOutput[User]Error
tags main
input (application/json)
// GET /users/{id}
type Input struct {
	pretty? boolean `in:"query"`

	id string `in:"path"`
}
output (application/json)
// GET /users/{id} (200)
type Output200 struct {	// GetUserOutput
	user struct {	// User
		// Name of the user
		name string

		// Age of the user
		age? integer
	}
}

// GET /users/{id} (default)
// default error
type OutputDefault struct {	// Error
	// Error code
	code integer `format:"int32"`

	// Error message
	message string
}

examples


// GET /users/{id} (default)

{
  "code": 444,
  "message": "unexpected error!"
}
description

get user


schemas

name summary
Error
User

Error

type Error struct {
	// Error code
	code integer `format:"int32"`

	// Error message
	message string
}

exmaples

// 
{
  "code": 444,
  "message": "unexpected error!"
}

User

type User struct {
	// Name of the user
	name string

	// Age of the user
	age? integer
}

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