This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Store

I wrote an OpenAPI specification (v3.1) for a made-up REST API with which you could create a clothing store with categories, brands, and items.

1 - API model

The model of the API
classDiagram
    class Store {
        UUID id
        String name
        blob logo
    }
    class Category {
        UUID id
        String name
    }
    Category <|-- Subcategory
    Subcategory: UUID category_id
    class Brand {
        UUID id
        String name
        blob logo
    }
    class Apparel {
        UUID id
        UUID store_id
        UUID category_id
        UUID subcategory_id
        UUID brand_id
        String color
        List~String~ sizes
        String fabric
        String description
    }
    Store *-- Apparel
    Category -- Apparel
    Subcategory -- Apparel
    Brand -- Apparel

2 - API reference

Try out the store API