An open API service indexing awesome lists of open source software.

https://github.com/hochfrequenz/bo4e-dotnet-ts-models

TypeScript models auto generated from BO4E-dotnet classes
https://github.com/hochfrequenz/bo4e-dotnet-ts-models

bo4e

Last synced: 5 months ago
JSON representation

TypeScript models auto generated from BO4E-dotnet classes

Awesome Lists containing this project

README

          

# bo4e-dotnet-ts-models

This repository contains the NPM package [`bo4e-dotnet-ts-models`](https://www.npmjs.com/package/bo4e-dotnet-ts-models).
The package contains typescript interfaces that are inherently consistent with the [BO4E-dotnet](https://github.com/Hochfrequenz/bo4E-dotnet/) data model which is used by many Hochfrequenz services (namely transformer.bee/edifact-bo4e-converter).

This repository contains no logic, just types for ease of use in any frontend project.

The files in [src](src/) are **completly autogenerated** from [JSON Schemas](https://github.com/Hochfrequenz/BO4E-dotnet/tree/main/json-schema-files), so they're inherently consistent with the BO4E.NET data model. Any push to the C# repos `json-schema-files` directory [creates](https://github.com/Hochfrequenz/BO4E-dotnet/blob/main/.github/workflows/generate_ts_models.yml) a commit in this repository.

### Installation

```bash
npm install bo4e-dotnet-ts-models
```

## Release Workflow (CI/CD)

- Update the source code (happens automatically via the .NET repo for [`/src`](/src))
- iff there are any new BO classes, re-export the autogenerated models in [index.d.ts](https://github.com/Hochfrequenz/bo4e-dotnet-ts-models/blob/main/index.d.ts)
- manually bump the the version in [`package.json`](package.json); It's best to choose the same version as the respective BO4E.net version that was used to generate the .ts models unless there's good reason to not do so.
- click on "[Draft a new Release](https://github.com/Hochfrequenz/bo4e-dotnet-ts-models/releases/new)" in the right sidebar on Github
- Choose a tag that has the form `v1.2.3` an the main branch where `v1.2.3` is the same version as the one you manually set in `index.d.ts`
- Autogenerate Release Notes