Stubs

Module

stubs/petstore

A demo API: a small pet store's pets and orders, to show what a module, its docs and its SDKs look like.

OfficialPublic
README.md

stubs/petstore

A demo API: a small pet store, with its pets, its orders and the services that manage them. It isn't a real service. It's here to show what a module looks like: its files, its documentation, and the SDKs generated from it, ready to install with your package manager.

What's in it

  • petstore/v1/pet.proto: a Pet, its species and whether it's for sale.
  • petstore/v1/pet_service.proto: PetService, to get, list (a page at a time, filtered by species or status), add, update (only the fields named in a field mask) and remove pets.
  • petstore/v1/order.proto: an Order for a pet.
  • petstore/v1/order_service.proto: OrderService, to place, get and cancel orders.

Using it

The SDKs tab has the code generated from this module for TypeScript, Go, Java and Kotlin, and Python, with the command that installs each one.

To use its types in your own module, add it to your buf.yaml:

version: v2
deps:
  - stubs.dev/stubs/petstore

Then import them: import "petstore/v1/pet.proto";.

About
Default label
main
Latest commit
2ff545c5db11
stubs-publisher ·
Browse 5 files
Depend on it in stubs.yaml
deps:
  - stubs.dev/stubs/petstore