OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
List products with filters.
Goal
Browse products on the marketplace.
Context
Product catalog, search.
Source Definition
import {
defineCommand,
defineQuery,
} from '@lssm-tech/lib.contracts-spec/operations';
import {
CreateProductInputModel,
ListProductsInputModel,
ListProductsOutputModel,
ProductModel,
} from './product.schema';
export const ListProductsContract = defineQuery({
meta: {
key: 'marketplace.product.list',
version: '1.0.0',
stability: 'stable',
owners: ['@example.marketplace'],
tags: ['marketplace', 'product', 'list'],
description: 'List products with filters.',
goal: 'Browse products on the marketplace.',
context: 'Product catalog, search.',
},
io: { input: ListProductsInputModel, output: ListProductsOutputModel },
policy: { auth: 'anonymous' },
acceptance: {
scenarios: [
{
key: 'list-products-happy-path',
given: ['Products exist'],
when: ['User searches for products'],
then: ['List of products is returned'],
},
],
examples: [
{
key: 'search-t-shirts',
input: { search: 't-shirt', limit: 20 },
output: { items: [], total: 50, hasMore: true },
},
],
},
});