@mmg-dev/webpipeline-types-grace-3
v2.0.0
Published
## Introduction This package provides Typescript types for Grace 3. It is maintained by the Webpipeline team.
Downloads
75
Keywords
Readme
Grace 3 Types
Introduction
This package provides Typescript types for Grace 3. It is maintained by the Webpipeline team.
Installation
pnpm i -D @mmg-dev/webpipeline-types-grace-3Usage
import type { paths, components } from "@mmg-dev/webpipeline-types-grace-3";
// Schema Obj
type MyType = components["schemas"]["MyType"];
// Path params
type EndpointParams = paths["/my-endpoint"]["parameters"];
// Response obj
type SuccessResponse =
paths["/my/endpoint"]["get"]["responses"][200]["content"]["application/json"]["schema"];
type ErrorResponse =
paths["/my/endpoint"]["get"]["responses"][500]["content"]["application/json"]["schema"];For maintainers
This package is published publicly until we have finished setting up our organization account.
The types are generated from a static schema file ./src/grace-3-schema.yaml. If the Grace 3 schema gets updated we need to update it aswell.
// build
pnpm run generate-types
// update version
npm version patch|minor|major
// publish
npm publish --access public