mirror of
https://github.com/jlengrand/adyen-node-api-library.git
synced 2026-03-10 08:01:20 +00:00
* PW-6591: Add new job to generate models * PW-6591: Point to checkout spec * PW-6591: Use generator from Docker image * PW-6591: Reset templates to defaults * PW-6591: Updating templates * PW-6591: Propose changes via PR * PW-6591: PR via external action * PW-6591: Based on develop * PW-6591: Update PR details * PW-6591: Pin generator to v5.4.0 * PW-6591: Updating templates Keep previous property template and move custom SaleToAcquirerData serializer to template. * PW-6591: Author PR as Adyen bot * PW-6591: Update author
26 lines
907 B
Makefile
26 lines
907 B
Makefile
generator=typescript-node
|
|
openapi-generator-cli=docker run --rm -v ${PWD}:/local -w /local openapitools/openapi-generator-cli:v5.4.0
|
|
|
|
clean:
|
|
rm -rf build
|
|
|
|
# Extract templates (copy them for modifications)
|
|
.PHONY: templates
|
|
templates:
|
|
$(openapi-generator-cli) author template -g ${generator} -o build/templates/typescript
|
|
|
|
build/spec:
|
|
mkdir -p build/spec
|
|
|
|
# Fetch spec files (git clone/submodule?)
|
|
build/spec/CheckoutService-v69.json: build/spec
|
|
wget https://raw.githubusercontent.com/Adyen/adyen-openapi/main/json/CheckoutService-v69.json -O build/spec/CheckoutService-v69.json
|
|
sed -i 's/"openapi" : "3.[0-9].[0-9]"/"openapi" : "3.0.0"/' build/spec/CheckoutService-v69.json
|
|
|
|
models: build/spec/CheckoutService-v69.json
|
|
$(openapi-generator-cli) generate \
|
|
-i build/spec/CheckoutService-v69.json \
|
|
-g ${generator} \
|
|
-t templates/typescript \
|
|
-o build \
|
|
--global-property models,supportingFiles
|