Stone.js API
    Preparing search index...
    • Class decorator: serve the API contract, declaratively.

      @OpenApi() is the whole setup. Two routes appear, /openapi.json and its explorer at /docs, and the document is assembled per request so the server URL it advertises is the host that answered: the same artefact documents itself correctly behind a local port, a load balancer or an API Gateway stage. Set docsPath: false to serve the machine-readable contract alone.

      Type Parameters

      • T extends ClassType = ClassType

      Parameters

      Returns ClassDecorator

      A class decorator.

      import { OpenApi } from '@stone-js/openapi'

      @OpenApi({ info: { title: 'Tasks', version: '1.0.0' } })
      @StoneApp({ name: 'my-app' })
      export class Application {}