mirror of
https://github.com/ivabus/pantry
synced 2024-11-29 19:55:06 +03:00
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
|
distributable:
|
||
|
url: https://github.com/swagger-api/swagger-codegen/archive/refs/tags/{{version.tag}}.tar.gz
|
||
|
strip-components: 1
|
||
|
|
||
|
versions:
|
||
|
github: swagger-api/swagger-codegen
|
||
|
|
||
|
dependencies:
|
||
|
openjdk.org: ^11
|
||
|
|
||
|
build:
|
||
|
dependencies:
|
||
|
maven.apache.org: '*'
|
||
|
script:
|
||
|
- mvn clean package
|
||
|
- install -D modules/swagger-codegen-cli/target/swagger-codegen-cli.jar {{prefix}}/libexec/lib/swagger-codegen-cli.jar
|
||
|
- run: |
|
||
|
cat > swagger-codegen <<EOF
|
||
|
#!/bin/sh
|
||
|
exec java -jar \$(dirname \$0)/../libexec/lib/swagger-codegen-cli.jar "\$@"
|
||
|
EOF
|
||
|
chmod +x swagger-codegen
|
||
|
working-directory: ${{prefix}}/bin
|
||
|
|
||
|
provides:
|
||
|
- bin/swagger-codegen
|
||
|
|
||
|
test:
|
||
|
- run: swagger-codegen generate -i $FIXTURE -l html
|
||
|
fixture:
|
||
|
content: |
|
||
|
openapi: 3.0.0
|
||
|
info:
|
||
|
version: 0.0.0
|
||
|
title: Simple API
|
||
|
paths:
|
||
|
/:
|
||
|
get:
|
||
|
responses:
|
||
|
200:
|
||
|
description: OK
|
||
|
extname: yaml
|
||
|
- cat index.html | grep "Simple API"
|
||
|
- swagger-codegen version | grep {{version}}
|