Shared types for OJP models based on OpenAPI / XSD Schema | Read-only mirror of https://github.com/openTdataCH/ojp-shared-types — SBB. Issues & pull requests at the source.
  • TypeScript 99.9%
  • Shell 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-30 12:12:42 +01:00
.github/workflows Update npm publish workflow, use Trusted Publishing 2026-04-24 11:47:44 +02:00
openapi reuse TurnActionEnum 2026-11-30 12:02:43 +01:00
scripts Fixed spec file paths 2026-01-29 23:44:15 +01:00
src Expose TurnActionEnum 2026-11-30 12:10:41 +01:00
.gitignore Adds .gitignore 2025-05-07 12:24:55 +02:00
CHANGELOG.md Updates CHANGELOG 2026-11-30 12:11:21 +01:00
LICENSE Initial commit 2025-05-06 10:46:37 +02:00
package-lock.json move openapi-typescript 2025-06-11 07:30:36 +02:00
package.json Bumps patch version 2026-11-30 12:06:09 +01:00
README.md Bumps patch version 2026-11-30 12:06:09 +01:00
tsconfig.json Adds tsconfig 2025-05-07 12:24:36 +02:00

ojp-shared-types

This repo contains the shared types used by OJP models based on OpenAPI / XSD Schema https://vdvde.github.io/OJP/develop/documentation-tables/ojp.html

Notes

Usage

  • include the ojp-shared-types package in the ./package.json dependencies of the project
  "dependencies": {
    "ojp-shared-types": "0.1.16"
  }
  • consume the OJP types in your application
import * as OJP_Types from 'ojp-shared-types';

export class MyOJPRequest implements OJP_Types.TripRequestSchema {
    ....
}

Build and extend the current models

  • edit openapi YAML files
  • generate models $ npm run generate:ts

License

The project is released under a MIT license.

Copyright (c) 2025 - 2026 Open Data Platform Mobility Switzerland - opentransportdata.swiss.