File: generate.sh

package info (click to toggle)
rust-motis-openapi-sdk 5.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 912 kB
  • sloc: sh: 40; makefile: 4
file content (11 lines) | stat: -rw-r--r-- 626 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
curl -o openapi.yml https://raw.githubusercontent.com/motis-project/motis/refs/heads/master/openapi.yaml
openapi-generator-cli generate -g rust -i openapi.yml --package-name motis-openapi-sdk

# Fix too long description
sed -i 's/description = .*/description = "Automatically generated code for the Motis OpenAPI description."/' Cargo.toml

# Change autor of autogenerated package; it is different from the autor of the OpenAPI specification.
sed -i 's/felix@triptix.tech/Julian Schmidhuber <railway-backend@schmidhuberj.de>/' Cargo.toml

# Disable clippy on generated code.
sed -i '1s/^/#![allow(clippy::all)]\n/' src/lib.rs