Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,8 @@ Note that the HTTP Client **must not** throw exceptions for 4xx and 5xx response

The classes under the `ShipStream\Ups\Api` namespace are all generated using [janephp](https://jane.readthedocs.io/en/latest/index.html).

**ARM/Docker Setups:**\
Run the `generate.sh` script to regenerate the classes when needed.

**AMD64 (WSL/Linux) Setups:**\
Run the `generate-amd64.sh` script to regenerate the classes when needed.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"require-dev": {
"jane-php/open-api-3": "^7.10",
"nyholm/psr7": "^1.8",
"phpunit/phpunit": "^9.6"
"phpunit/phpunit": "^9.6",
"elidrissidev/openapi-merge": "1.5.2",
"cebe/php-openapi": "1.7.0"
},
"autoload": {
"psr-4": {
Expand Down
14 changes: 14 additions & 0 deletions generate-amd64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
# This version of the generate.sh script should work on any x86/amd64 linux based systems.
# You must run `composer install` prior to executing this.
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
# Merge the individual OpenAPI definitions into a single file
[[ -e openapi.yaml ]] && rm -f openapi.yaml
vendor/bin/openapi-merge \
--resolve-references 0 \
-o openapi.yaml \
openapi/Base.yaml \
openapi/*.yaml
# Generate API classes with Jane
php -d memory_limit=512M vendor/bin/jane-openapi generate -c .jane-openapi.php