Skip to content

boschglobal/dse.schemas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic Simulation Environment - Schemas

CI GitHub

Introduction

Schemas of the Dynamic Simulation Environment (DSE) Core Platform.

Project Structure

L- docs        Documentation (integrates with Hugo/Docsy).
L- schemas     Schemas of the DSE Core Platform.
L- templates   Templates used for building schema packages.

Usage

Toolchains

The Schemas are built using containerised toolchains. Those are available from the DSE C Library and can be built as follows:

$ git clone https://github.com/boschglobal/dse.clib.git
$ cd dse.clib
$ make docker

Alternatively, the latest Docker Images are available on ghcr.io and can be used as follows:

$ export FLATC_BUILDER_IMAGE=ghcr.io/boschglobal/dse-flatc-builder:main
$ export PYTHON_BUILDER_IMAGE=ghcr.io/boschglobal/dse-python-builder:main

Build

# Get the repo
$ git clone https://github.com/boschglobal/dse.schemas.git
$ cd dse.schemas

# Optionally set builder images.
$ export FLATC_BUILDER_IMAGE=ghcr.io/boschglobal/dse-flatc-builder:main
$ export PYTHON_BUILDER_IMAGE=ghcr.io/boschglobal/dse-python-builder:main

# Build and package the schemas.
$ make
...
$ make dist
Distribution package files:
--------------------------
164K /git/boschglobal/dse.schemas/dist/dse-schemas.tar.gz
20K /git/boschglobal/dse.schemas/dist/python/dist/dse.schemas-0.0.2-py3-none-any.whl
12K /git/boschglobal/dse.schemas/dist/python/dist/dse.schemas-0.0.2.tar.gz

Development

# Generate documentation based on schemas.
make generate

# Install Python package for local development.
make install

# Remove (clean) temporary build artifacts.
make clean

The generate make target requires some tools which may be installed as follows:

$ sudo apt install npm

or

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
$ export NVM_DIR="$HOME/.nvm"
$ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
$ nvm ls-remote
$ nvm install 18
$ nvm use 18
$ sudo chown -R $USER:$(id -gn $USER) /home/XYZ/package-lock.json

# widdershins
$ git clone https://github.com/Mermade/widdershins.git
$ cd widdershins/
$ npm install -g widdershins --before=2020-04-01

# swagger-cli
$ npm install -g @apidevtools/swagger-cli

# oapi-codegen
$ go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest

# json-schema-to-openapi-schema
$ npm install -g @openapi-contrib/json-schema-to-openapi-schema

# Audit
$ npm list -g
/usr/local/lib
├── @apidevtools/[email protected]
├── [email protected]
└── [email protected]

Dependencies

Schemas in this repository require:

Later versions may require testing.

Contribute

Please refer to the CONTRIBUTING.md file.

License

Dynamic Simulation Environment Schemas is open-sourced under the Apache-2.0 license. See the LICENSE and NOTICE files for details.

About

Schemas of the Dynamic Simulation Environment Core Platform.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published