petstore-expanded/

directory
v0.0.0-...-7b47575 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT

README

OpenAPI Code Generation Example

This directory contains an example server using our code generator which implements the OpenAPI petstore-expanded example.

This is the structure:

  • api/: Contains the OpenAPI 3.0 specification
  • api/petstore/: The generated code for our pet store handlers
  • internal/: Pet store handler implementation and unit tests
  • cmd/: Runnable server implementing the OpenAPI 3 spec.

To generate the handler glue, run:

go run cmd/oapi-codegen/oapi-codegen.go --package petstore examples/petstore-expanded/petstore-expanded.yaml  > examples/petstore-expanded/petstore.gen.go

Directories

Path Synopsis
chi
api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
This is an example of implementing the Pet Store from the OpenAPI documentation found at: https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore.yaml
This is an example of implementing the Pet Store from the OpenAPI documentation found at: https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore.yaml
api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
api/models
Package models provides primitives to interact with the openapi HTTP API.
Package models provides primitives to interact with the openapi HTTP API.
api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
gin
api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
This is an example of implementing the Pet Store from the OpenAPI documentation found at: https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore.yaml
This is an example of implementing the Pet Store from the OpenAPI documentation found at: https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore.yaml
api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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