forked from loafle/openapi-generator-original
Compare commits
10 Commits
master
...
travis_tes
Author | SHA1 | Date | |
---|---|---|---|
|
2177039d7c | ||
|
8544382d53 | ||
|
151017b672 | ||
|
6095a0676c | ||
|
d3153a8eae | ||
|
f2f10b429e | ||
|
f7d31a3eab | ||
|
72f6bda2f7 | ||
|
3e99d2df73 | ||
|
44caf2e7cf |
@ -1,202 +0,0 @@
|
||||
version: 2.1
|
||||
commands: # a reusable command with parameters
|
||||
command_build_and_test:
|
||||
parameters:
|
||||
nodeNo:
|
||||
default: "0"
|
||||
type: string
|
||||
steps:
|
||||
# Restore the dependency cache
|
||||
- restore_cache:
|
||||
keys:
|
||||
# Default branch if not
|
||||
- source-v2-{{ .Branch }}-{{ .Revision }}
|
||||
- source-v2-{{ .Branch }}-
|
||||
- source-v2-
|
||||
# Machine Setup
|
||||
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
|
||||
- run:
|
||||
name: Install Headless Chrome dependencies
|
||||
command: |
|
||||
sudo apt-get update && sudo apt-get install -yq \
|
||||
gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
|
||||
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
|
||||
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 \
|
||||
libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates \
|
||||
fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm1
|
||||
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
|
||||
- checkout
|
||||
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
|
||||
# In many cases you can simplify this from what is generated here.
|
||||
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
|
||||
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
|
||||
# This is based on your 1.0 configuration file or project settings
|
||||
#- run:
|
||||
# command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
|
||||
- run:
|
||||
command: java -version
|
||||
- run:
|
||||
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
|
||||
- run:
|
||||
command: |
|
||||
sudo tee -a /etc/hosts \<<< "127.0.0.1 path.v1.test.openapi-generator.tech"
|
||||
sudo tee -a /etc/hosts \<<< "127.0.0.1 path.v2.test.openapi-generator.tech"
|
||||
sudo tee -a /etc/hosts \<<< "127.0.0.111 path.v3.test.openapi-generator.tech"
|
||||
sudo tee -a /etc/hosts \<<< "127.0.0.1 operation.v1.test.openapi-generator.tech"
|
||||
sudo tee -a /etc/hosts \<<< "127.0.0.1 operation.v2.test.openapi-generator.tech"
|
||||
sudo tee -a /etc/hosts \<<< "127.0.0.111 operation.v3.test.openapi-generator.tech"
|
||||
sudo tee -a /etc/hosts \<<< "127.0.0.1 server.v1.test.openapi-generator.tech"
|
||||
sudo tee -a /etc/hosts \<<< "127.0.0.1 server.v2.test.openapi-generator.tech"
|
||||
sudo tee -a /etc/hosts \<<< "127.0.0.111 server.v3.test.openapi-generator.tech"
|
||||
sudo tee -a /etc/hosts \<<< "127.0.0.1 petstore.swagger.io"
|
||||
cat /etc/hosts
|
||||
# - run: docker pull openapitools/openapi-petstore
|
||||
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore
|
||||
- run: docker pull swaggerapi/petstore
|
||||
- run: docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
|
||||
- run: docker ps -a
|
||||
- run: sleep 30
|
||||
- run: cat /etc/hosts
|
||||
- run: export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
|
||||
- run:
|
||||
name: "Setup custom environment variables"
|
||||
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
|
||||
- run: ./CI/circle_parallel.sh
|
||||
# Save dependency cache
|
||||
#- save_cache:
|
||||
# key: source-v2-{{ .Branch }}-{{ .Revision }}
|
||||
# paths:
|
||||
# # This is a broad list of cache paths to include many possible development environments
|
||||
# # You can probably delete some of these entries
|
||||
# - ~/.m2
|
||||
# - ~/.ivy2
|
||||
# - ~/.sbt
|
||||
# - ~/.bundle
|
||||
# - ~/.go_workspace
|
||||
# - ~/.gradle
|
||||
# - ".git"
|
||||
# - ~/.stack
|
||||
# - ~/R
|
||||
## save "default" cache using the key "source-v2-"
|
||||
#- save_cache:
|
||||
# key: source-v2-
|
||||
# paths:
|
||||
# # This is a broad list of cache paths to include many possible development environments
|
||||
# # You can probably delete some of these entries
|
||||
# - vendor/bundle
|
||||
# - ~/.m2
|
||||
# - ~/.ivy2
|
||||
# - ~/.sbt
|
||||
# - ~/.bundle
|
||||
# - ~/.go_workspace
|
||||
# - ~/.gradle
|
||||
# - ~/.cache/bower
|
||||
# - ".git"
|
||||
# - ~/.stack
|
||||
# - ~/R
|
||||
# Teardown
|
||||
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
|
||||
# Save test results
|
||||
- store_test_results:
|
||||
path: /tmp/circleci-test-results
|
||||
# Save artifacts
|
||||
- store_artifacts:
|
||||
path: /tmp/circleci-artifacts
|
||||
- store_artifacts:
|
||||
path: /tmp/circleci-test-results
|
||||
command_docker_build_and_test:
|
||||
parameters:
|
||||
nodeNo:
|
||||
default: "0"
|
||||
type: string
|
||||
steps:
|
||||
# Machine Setup
|
||||
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
|
||||
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
|
||||
- checkout
|
||||
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
|
||||
# In many cases you can simplify this from what is generated here.
|
||||
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
|
||||
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
|
||||
# This is based on your 1.0 configuration file or project settings
|
||||
# - run:
|
||||
# command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
|
||||
# - run:
|
||||
# Test
|
||||
# - run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
- run:
|
||||
name: "Setup custom environment variables"
|
||||
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
|
||||
- run: ./CI/circle_parallel.sh
|
||||
# Teardown
|
||||
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
|
||||
# Save test results
|
||||
- store_test_results:
|
||||
path: /tmp/circleci-test-results
|
||||
# Save artifacts
|
||||
- store_artifacts:
|
||||
path: /tmp/circleci-artifacts
|
||||
- store_artifacts:
|
||||
path: /tmp/circleci-test-results
|
||||
jobs:
|
||||
node0:
|
||||
machine:
|
||||
image: ubuntu-2004:2024.01.1
|
||||
working_directory: ~/OpenAPITools/openapi-generator
|
||||
shell: /bin/bash --login
|
||||
environment:
|
||||
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
|
||||
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
|
||||
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
|
||||
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
|
||||
steps:
|
||||
- command_build_and_test:
|
||||
nodeNo: "0"
|
||||
node1:
|
||||
machine:
|
||||
image: ubuntu-2004:2024.01.1
|
||||
working_directory: ~/OpenAPITools/openapi-generator
|
||||
shell: /bin/bash --login
|
||||
environment:
|
||||
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
|
||||
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
|
||||
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
|
||||
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
|
||||
steps:
|
||||
- command_build_and_test:
|
||||
nodeNo: "1"
|
||||
node2:
|
||||
machine:
|
||||
image: ubuntu-2004:2024.01.1
|
||||
working_directory: ~/OpenAPITools/openapi-generator
|
||||
shell: /bin/bash --login
|
||||
environment:
|
||||
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
|
||||
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
|
||||
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
|
||||
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
|
||||
steps:
|
||||
- command_build_and_test:
|
||||
nodeNo: "2"
|
||||
node3:
|
||||
machine:
|
||||
image: ubuntu-2004:2024.01.1
|
||||
working_directory: ~/OpenAPITools/openapi-generator
|
||||
shell: /bin/bash --login
|
||||
environment:
|
||||
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
|
||||
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
|
||||
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
|
||||
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
|
||||
steps:
|
||||
- checkout
|
||||
- command_build_and_test:
|
||||
nodeNo: "3"
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- node0
|
||||
- node1
|
||||
- node2
|
||||
- node3
|
@ -1 +0,0 @@
|
||||
RUN apt update && apt install -y maven
|
@ -1,53 +0,0 @@
|
||||
{
|
||||
"name": "OpenAPIGenerator",
|
||||
"image": "mcr.microsoft.com/devcontainers/base:debian",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/java:1": {
|
||||
"version": "11",
|
||||
"installMaven": true
|
||||
},
|
||||
"ghcr.io/devcontainers/features/node:1": {
|
||||
"version": "lts"
|
||||
},
|
||||
"ghcr.io/devcontainers/features/rust:1": {},
|
||||
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {},
|
||||
"docker-in-docker": {
|
||||
"version": "latest",
|
||||
"moby": true,
|
||||
"dockerDashComposeVersion": "v1"
|
||||
}
|
||||
},
|
||||
// Configure tool-specific properties.
|
||||
"customizations": {
|
||||
// Configure properties specific to VS Code.
|
||||
"vscode": {
|
||||
// Set *default* container specific settings.json values on container create.
|
||||
"settings": {
|
||||
"java.configuration.runtimes": [
|
||||
{
|
||||
"name": "JavaSE-11",
|
||||
"path": "/usr/local/sdkman/candidates/java/current",
|
||||
"sources": "/usr/local/sdkman/candidates/java/current/lib/src.zip",
|
||||
"javadoc": "https://docs.oracle.com/en/java/javase/11/docs/api",
|
||||
"default": true
|
||||
}
|
||||
]
|
||||
},
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
"vscjava.vscode-java-pack",
|
||||
"attilabuti.mustache-syntax-vscode",
|
||||
"formulahendry.code-runner",
|
||||
"visualstudioexptteam.vscodeintellicode",
|
||||
"42crunch.vscode-openapi",
|
||||
"mermade.openapi-lint"
|
||||
]
|
||||
}
|
||||
},
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// "postCreateCommand": "mvn clean package -DskipTests",
|
||||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
||||
"remoteUser": "vscode"
|
||||
}
|
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1,2 +0,0 @@
|
||||
**/*.mustache linguist-vendored=true
|
||||
* text=auto eol=lf
|
117
.github/.test/auto-labeler.js
vendored
117
.github/.test/auto-labeler.js
vendored
@ -1,117 +0,0 @@
|
||||
let fs = require('fs');
|
||||
let path = require('path');
|
||||
let util = require('util');
|
||||
let yaml = require('./js-yaml.js');
|
||||
let samples = require('./samples.json');
|
||||
|
||||
class LabelMatch {
|
||||
constructor (match, label) {
|
||||
this.match = match;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
|
||||
class FileError {
|
||||
constructor (file, actualLabels, expectedLabels) {
|
||||
this.file = file;
|
||||
this.actual = actualLabels;
|
||||
this.expected = expectedLabels;
|
||||
}
|
||||
}
|
||||
|
||||
class TextError {
|
||||
constructor (text, actualLabels, expectedLabels) {
|
||||
this.text = text;
|
||||
this.actual = actualLabels;
|
||||
this.expected = expectedLabels;
|
||||
}
|
||||
}
|
||||
|
||||
let labels = [];
|
||||
|
||||
function labelsForFile(file) {
|
||||
let body = fs.readFileSync(file);
|
||||
return labelsForText(body)
|
||||
}
|
||||
|
||||
function labelsForText(text) {
|
||||
let addLabels = new Set();
|
||||
let body = text;
|
||||
for (const v of labels) {
|
||||
if (v.match.test(body)) {
|
||||
addLabels.add(v.label)
|
||||
}
|
||||
// reset regex state
|
||||
v.match.lastIndex = 0
|
||||
}
|
||||
return addLabels;
|
||||
}
|
||||
|
||||
try {
|
||||
let config = yaml.safeLoad(fs.readFileSync('../auto-labeler.yml', 'utf8'));
|
||||
|
||||
if (config && config.labels && Object.keys(config.labels).length > 0) {
|
||||
for (const labelName in config.labels) {
|
||||
if (config.labels.hasOwnProperty(labelName)) {
|
||||
let matchAgainst = config.labels[labelName];
|
||||
if (Array.isArray(matchAgainst)) {
|
||||
matchAgainst.forEach(regex => {
|
||||
// noinspection JSCheckFunctionSignatures
|
||||
labels.push(new LabelMatch(new RegExp(regex, 'g'), labelName));
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (labels.length === 0) {
|
||||
// noinspection ExceptionCaughtLocallyJS
|
||||
throw new Error("Expected to parse config.labels, but failed.")
|
||||
}
|
||||
|
||||
let fileErrors = [];
|
||||
samples.files.forEach(function(tester){
|
||||
let file = path.normalize(path.join('..', '..', 'bin', tester.input));
|
||||
let expectedLabels = new Set(tester.matches);
|
||||
let actualLabels = labelsForFile(file);
|
||||
let difference = new Set([...actualLabels].filter(x => !expectedLabels.has(x)));
|
||||
if (difference.size > 0) {
|
||||
fileErrors.push(new FileError(file, actualLabels, expectedLabels));
|
||||
}
|
||||
});
|
||||
|
||||
let textErrors = [];
|
||||
samples.text.forEach(function(tester){
|
||||
let expectedLabels = new Set(tester.matches);
|
||||
let actualLabels = labelsForText(tester.input);
|
||||
let difference = new Set([...actualLabels].filter(x => !expectedLabels.has(x)));
|
||||
if (difference.size > 0) {
|
||||
textErrors.push(new TextError(tester.input, actualLabels, expectedLabels));
|
||||
}
|
||||
});
|
||||
|
||||
// These are separate (file vs text) in case we want to preview where these would fail in the file. not priority at the moment.
|
||||
if (fileErrors.length > 0) {
|
||||
console.warn('There were %d file tester errors', fileErrors.length);
|
||||
fileErrors.forEach(function(errs) {
|
||||
console.log("file: %j\n actual: %j\n expected: %j", errs.file, util.inspect(errs.actual), util.inspect(errs.expected))
|
||||
});
|
||||
}
|
||||
|
||||
if (textErrors.length > 0) {
|
||||
console.warn('There were %d text tester errors', textErrors.length);
|
||||
textErrors.forEach(function(errs){
|
||||
console.log("input: %j\n actual: %j\n expected: %j", errs.text, util.inspect(errs.actual), util.inspect(errs.expected))
|
||||
})
|
||||
}
|
||||
|
||||
let totalErrors = fileErrors.length + textErrors.length;
|
||||
if (totalErrors === 0) {
|
||||
console.log('Success!');
|
||||
} else {
|
||||
console.log('Failure: %d total errors', totalErrors);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
3917
.github/.test/js-yaml.js
vendored
3917
.github/.test/js-yaml.js
vendored
File diff suppressed because it is too large
Load Diff
1344
.github/.test/samples.json
vendored
1344
.github/.test/samples.json
vendored
File diff suppressed because it is too large
Load Diff
30
.github/CODEOWNERS
vendored
30
.github/CODEOWNERS
vendored
@ -1,30 +0,0 @@
|
||||
## Core team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/config/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/**/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/serializer/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/**/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/**/*.java @OpenAPITools/generator-core-team
|
||||
modules/openapi-generator-core/**/* @OpenAPITools/generator-core-team
|
||||
|
||||
# No need for auto-generated subdirectories (reduces noise)
|
||||
docs/ @OpenAPITools/generator-core-team
|
||||
|
||||
## Build related
|
||||
CI/**/* @OpenAPITools/build
|
||||
.mvn/**/* @OpenAPITools/build
|
||||
bin/utils/**/* @OpenAPITools/build
|
||||
|
||||
# cpp-qt-client technical committee
|
||||
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @ravinikam
|
||||
samples/client/petstore/cpp-qt/**/* @ravinikam
|
||||
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @stkrwork
|
||||
samples/client/petstore/cpp-qt/**/* @stkrwork
|
||||
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @etherealjoy
|
||||
samples/client/petstore/cpp-qt/**/* @etherealjoy
|
||||
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @martindelille
|
||||
samples/client/petstore/cpp-qt/**/* @martindelille
|
||||
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @muttleyxd
|
||||
samples/client/petstore/cpp-qt/**/* @muttleyxd
|
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@ -1 +0,0 @@
|
||||
open_collective: openapi_generator
|
10
.github/ISSUE_TEMPLATE/announcement.md
vendored
10
.github/ISSUE_TEMPLATE/announcement.md
vendored
@ -1,10 +0,0 @@
|
||||
---
|
||||
name: Announcement
|
||||
about: Announcements related to the project
|
||||
title: "[Announcement] TITLE"
|
||||
labels: Announcement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
67
.github/ISSUE_TEMPLATE/bug_report.md
vendored
67
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,67 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a bug report to help us improve
|
||||
title: "[BUG] Description"
|
||||
labels: 'Issue: Bug'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
#### Bug Report Checklist
|
||||
|
||||
- [ ] Have you provided a full/minimal spec to reproduce the issue?
|
||||
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apitools.dev/swagger-parser/online/))?
|
||||
- [ ] Have you [tested with the latest master](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) to confirm the issue still exists?
|
||||
- [ ] Have you searched for related issues/PRs?
|
||||
- [ ] What's the actual output vs expected output?
|
||||
- [ ] [Optional] Sponsorship to speed up the bug fix or feature request ([example](https://github.com/OpenAPITools/openapi-generator/issues/6178))
|
||||
|
||||
<!--
|
||||
Please follow the issue template below for bug reports.
|
||||
Also please indicate in the issue title which language/library is concerned. Eg: [BUG][JAVA] Bug generating foo with bar
|
||||
-->
|
||||
|
||||
##### Description
|
||||
|
||||
<!-- describe what is the question, suggestion or issue and why this is a problem for you. -->
|
||||
|
||||
##### openapi-generator version
|
||||
|
||||
<!-- which version of openapi-generator are you using, is it a regression? -->
|
||||
|
||||
##### OpenAPI declaration file content or url
|
||||
|
||||
<!-- if it is a bug, a json or yaml that produces it.
|
||||
If you post the code inline, please wrap it with
|
||||
```yaml
|
||||
(here your code)
|
||||
```
|
||||
(for YAML code) or
|
||||
```json
|
||||
(here your code)
|
||||
```
|
||||
(for JSON code), so it becomes more readable. If it is longer than about ten lines,
|
||||
please create a Gist (https://gist.github.com) or upload it somewhere else and
|
||||
link it here.
|
||||
-->
|
||||
|
||||
##### Generation Details
|
||||
|
||||
<!--
|
||||
Prefer CLI steps, including the language, libraries and various options.
|
||||
Providing config-based settings allows for simpler testing across CLI and plugins.
|
||||
For examples, see https://github.com/OpenAPITools/openapi-generator/tree/master/bin/configs
|
||||
-->
|
||||
|
||||
##### Steps to reproduce
|
||||
|
||||
<!-- unambiguous set of steps to reproduce the bug.-->
|
||||
|
||||
##### Related issues/PRs
|
||||
|
||||
<!-- has a similar issue/PR been reported/opened before? Please do a search in https://github.com/openapitools/openapi-generator/issues?utf8=%E2%9C%93&q=is%3Aissue%20 -->
|
||||
|
||||
##### Suggest a fix
|
||||
|
||||
<!-- if you can't fix the bug yourself, perhaps you can point to what might be
|
||||
causing the problem (line of code or commit), or simply make a suggestion -->
|
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -1,24 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: "[REQ] Feature Request Description"
|
||||
labels: 'Enhancement: Feature'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
### Is your feature request related to a problem? Please describe.
|
||||
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
## Describe the solution you'd like
|
||||
|
||||
<!-- A clear and concise description of what you want to happen. -->
|
||||
|
||||
## Describe alternatives you've considered
|
||||
|
||||
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||
|
||||
## Additional context
|
||||
|
||||
<!-- Add any other context or screenshots about the feature request here. -->
|
28
.github/PULL_REQUEST_TEMPLATE.md
vendored
28
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,21 +1,11 @@
|
||||
<!-- Enter details of the change here. Include additional tests that have been done, reference to the issue for tracking, etc. -->
|
||||
|
||||
<!-- Please check the completed items below -->
|
||||
### PR checklist
|
||||
|
||||
|
||||
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
|
||||
- [ ] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
|
||||
- [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples:
|
||||
```
|
||||
./mvnw clean package || exit
|
||||
./bin/generate-samples.sh ./bin/configs/*.yaml || exit
|
||||
./bin/utils/export_docs_generators.sh || exit
|
||||
```
|
||||
(For Windows users, please run the script in [Git BASH](https://gitforwindows.org/))
|
||||
Commit all changed files.
|
||||
This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master.
|
||||
These must match the expectations made by your contribution.
|
||||
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`.
|
||||
IMPORTANT: Do **NOT** purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
|
||||
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming `7.x.0` minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
|
||||
- [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.
|
||||
- [ ] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh` and `./bin/security/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\bin\windows\`.
|
||||
- [ ] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `3.1.x`, `4.0.x`. Default: `master`.
|
||||
- [ ] Copied the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.
|
||||
|
||||
### Description of the PR
|
||||
|
||||
(details of the change, additional tests that have been done, reference to the issue for tracking, etc)
|
||||
|
||||
|
19
.github/actions/run-samples/action.yaml
vendored
19
.github/actions/run-samples/action.yaml
vendored
@ -1,19 +0,0 @@
|
||||
name: 'Run samples'
|
||||
description: 'Runs sample integration test profile with Maven'
|
||||
inputs:
|
||||
name:
|
||||
description: 'The Maven profile name'
|
||||
required: true
|
||||
goal:
|
||||
description: 'Maven goal'
|
||||
required: false
|
||||
default: 'verify'
|
||||
args:
|
||||
description: 'Additional maven arguments'
|
||||
required: false
|
||||
default: ''
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: ./mvnw clean --no-snapshot-updates --batch-mode --quiet ${{ inputs.goal }} -P${{ inputs.name }} -Dintegration-test -Dmaven.javadoc.skip=true ${{ inputs.args }}
|
||||
shell: bash
|
286
.github/auto-labeler.yml
vendored
286
.github/auto-labeler.yml
vendored
@ -1,286 +0,0 @@
|
||||
comment: |
|
||||
👍 Thanks for opening this issue!
|
||||
🏷 I have applied any labels matching special text in your issue.
|
||||
|
||||
The team will review the labels and make any necessary changes.
|
||||
labels:
|
||||
'Announcement':
|
||||
- '\s*?\[[Aa]nnouncement\]\s*?'
|
||||
'Breaking change (with fallback)':
|
||||
- '\s*?[bB]reaking [cC]hange [wW]ith [fF]allback\s*?'
|
||||
'Breaking change (without fallback)':
|
||||
- '\s*?[bB]reaking [cC]hange [wW]ithout [fF]allback\s*?'
|
||||
'Client: Ada':
|
||||
- '\s*?\[ada\]\s*?'
|
||||
- '\s*?-[gl] ada(?!-)\b'
|
||||
'Client: Android':
|
||||
- '\s*?\[android\]\s*?'
|
||||
- '\s*?-[gl] android(?!-)\b'
|
||||
'Client: Apex':
|
||||
- '\s*?\[apex\]\s*?'
|
||||
- '\s*?-[gl] apex(?!-)\b'
|
||||
'Client: Bash':
|
||||
- '\s*?\[bash\]\s*?'
|
||||
- '\s*?-[gl] bash(?!-)\b'
|
||||
'Client: C':
|
||||
- '\s*?\[[cC]\]\s*?'
|
||||
- '\s*?-[gl] c(?!-)\b'
|
||||
# 'Client: Ceylon':
|
||||
'Client: C++':
|
||||
- '\s*?\[cpp(-.*)?-client\]\s*?'
|
||||
- '\s*?-[gl] cpp(-.*)?-client\s*?'
|
||||
- '\s*?-[gl] cpp-restsdk(?!-)\b'
|
||||
- '\s*?-[gl] cpp-tizen(?!-)\b'
|
||||
'Client: C-Sharp':
|
||||
- '\s*?-[gl] csharp(?!-)\b'
|
||||
- '\s*?[cC]-[sS]harp [cC]lient\s*?'
|
||||
- '\s*?-[gl] csharp-dotnet2\s*?'
|
||||
- '\s*?-[gl] csharp-refactor?\s*?'
|
||||
- '\s*?\[[Cc]#\]'
|
||||
- '\s*?\[csharp\]\s*?'
|
||||
'Client: Clojure':
|
||||
- '\s*?\[clojure\]\s*?'
|
||||
- '\s*?-[gl] clojure(?!-)\b'
|
||||
# 'Client: Crystal':
|
||||
'Client: Dart':
|
||||
- '\s*?\[dart\]\s*?'
|
||||
- '\s*?-[gl] dart(?!-)\b'
|
||||
'Client: Dukescript':
|
||||
- '\s*?\[dukescript\]\s*?'
|
||||
- '\s*?-g dukescript\s*?'
|
||||
'Client: Eiffel':
|
||||
- '\s*?\[eiffel\]\s*?'
|
||||
- '\s*?-[gl] eiffel(?!-)\b'
|
||||
'Client: Elixir':
|
||||
- '\s*?\[elixir\]\s*?'
|
||||
- '\s*?-[gl] elixir(?!-)\b'
|
||||
'Client: Elm':
|
||||
- '\s*?\[elm\]\s*?'
|
||||
- '\s*?-[gl] elm(?!-)\b'
|
||||
'Client: Erlang':
|
||||
- '\s*?\[erlang(-.*)?-client\]\s*?'
|
||||
- '\s*?-[gl] erlang(-.*)?-client\s*?'
|
||||
- '\s*?\[erlang-proper\]\s*?'
|
||||
- '\s*?-[gl] erlang-proper\s*?'
|
||||
'Client: Go':
|
||||
- '\s*?\[go\]\s*?'
|
||||
- '\s*?-[gl] go(?!-)\b'
|
||||
'Client: Groovy':
|
||||
- '\s*?\[groovy\]\s*?'
|
||||
- '\s*?-[gl] groovy(?!-)\b'
|
||||
'Client: HTML':
|
||||
- '\s*?\[html[2]?\]\s*?'
|
||||
- '\s*?-[gl] html[2]?\s*?'
|
||||
'Client: Haskell':
|
||||
- '\s*?\[haskell(-.*)?-client\]\s*?'
|
||||
- '\s*?-[gl] haskell(-.*)?-client\s*?'
|
||||
'Client: JMeter':
|
||||
- '\s*?\[jmeter\]\s*?'
|
||||
- '\s*?-[gl] jmeter\s*?'
|
||||
'Client: Java':
|
||||
- '\s*?\[java\]\s*?'
|
||||
- '\s*?-[gl] java(?!-)\b'
|
||||
'Client: JavaScript/Node.js':
|
||||
- '\s*?\[javascript\]\s*?'
|
||||
- '\s*?-[gl] javascript\s*?'
|
||||
- '\s*?-[gl] javascript-(\S)*\s*?'
|
||||
# 'Client: Julia': # NOTE: Not yet implemented
|
||||
'Client: Kotlin':
|
||||
- '\s*?\[kotlin\]\s*?'
|
||||
- '\s*?-[gl] kotlin(?!-)\b'
|
||||
'Client: Lisp':
|
||||
- '\s*?\[lisp\]\s*?'
|
||||
- '\s*?-[gl] lisp(?!-)\b'
|
||||
'Client: Lua':
|
||||
- '\s*?\[lua\]\s*?'
|
||||
- '\s*?-[gl] lua(?!-)\b'
|
||||
'Client: Objc':
|
||||
- '\s*?\[objc\]\s*?'
|
||||
- '\s*?-[gl] objc\s*?'
|
||||
# 'Client: OCaml':
|
||||
'Client: Perl':
|
||||
- '\s*?\[perl\]\s*?'
|
||||
- '\s*?-[gl] perl(?!-)\b'
|
||||
# 'Client: PHP':
|
||||
'Client: PowerShell':
|
||||
- '\s*?\[powershell\]\s*?'
|
||||
- '\s*?-[gl] powershell\s*?'
|
||||
'Client: Python':
|
||||
- '\s*?\[python\]\s*?'
|
||||
- '\s*?-[gl] python(?!-)\b'
|
||||
'Client: QT':
|
||||
- '\s*?\[cpp-qt5-client\]\s*?'
|
||||
- '\s*?-[gl] cpp-qt5-client\s*?'
|
||||
'Client: R':
|
||||
- '\s*?\[[rR]\]\s*?'
|
||||
- '\s*?-[gl] r(?!-)\b'
|
||||
'Client: Reason ML':
|
||||
- '\s*?\[reasonml\]\s*?'
|
||||
- '\s*?-[g] reasonml\s*?'
|
||||
'Client: Retrofit':
|
||||
- '\s*?retrofit.*?\s*?'
|
||||
'Client: Ruby':
|
||||
- '\s*?\[ruby\]\s*?'
|
||||
- '\s*?-[gl] ruby(?!-)\b'
|
||||
'Client: Rust':
|
||||
- '\s*?\[rust\]\s*?'
|
||||
- '\s*?-[gl] rust(?!-)\b'
|
||||
'Client: Scala':
|
||||
- '\s*?\[scalaz\]\s*?'
|
||||
- '\s*?-[gl] scalaz\s*?'
|
||||
- '\s*?\[scala-(?!finch)[a-z]+\]\b'
|
||||
- '\s*?-[gl] scala-(?!finch)[a-z]+?(?!-)\b'
|
||||
'Client: Swift':
|
||||
- '\s*?\[swift[34]+\]\s*?'
|
||||
- '\s*?-[gl] swift[34]+\s*?'
|
||||
- '\s*?-[gl] swift2-deprecated\s*?'
|
||||
'Client: TypeScript':
|
||||
- '\s*?\[typescript\]\s*?'
|
||||
- '\s*?\[typescript-[\-a-z]+\]\s*?'
|
||||
- '\s*?-[gl] typescript-[\-a-z]+\s*?'
|
||||
# 'Client: VB/VB.net': # NOTE: Not yet implemented
|
||||
# 'Client: Visual Basic': # TODO: REMOVE UNUSED LABEL
|
||||
'Config: Apache':
|
||||
- '\s*?\[apache2\]\s*?'
|
||||
- '\s*?-[gl] apache2\s*?'
|
||||
'Docker':
|
||||
- '\s*?\[docker\]\s*?'
|
||||
'Documentation: Cwiki':
|
||||
- '\s*?\[cwiki\]\s*?'
|
||||
- '\s*?-[gl] cwiki\s*?'
|
||||
'Documentation: Dynamic HTML':
|
||||
- '\s*?\[dynamic-html\]\s*?'
|
||||
- '\s*?-[gl] dynamic-html\s*?'
|
||||
'Enhancement: CI/Test':
|
||||
- '\s*?\[ci\]\s*?'
|
||||
'Enhancement: Code format':
|
||||
- '\s*?\[format(ting)?\]\s*?'
|
||||
# 'Enhancement: Compatibility':
|
||||
'Enhancement: Feature':
|
||||
- '\s*?\[feat(ure)?s*?'
|
||||
'Enhancement: General':
|
||||
- '\s*?\[general\]\s*?'
|
||||
- '\s*?\[core\]\s*?'
|
||||
# 'Enhancement: New generator':
|
||||
'Enhancement: Performance':
|
||||
- '\s*?\[perf\]\s*?'
|
||||
# 'Feature List: API clients':
|
||||
# 'Feature List: API documentations':
|
||||
# 'Feature List: API servers':
|
||||
# 'Feature: Authentication':
|
||||
# 'Feature: Composition / Inheritance':
|
||||
# 'Feature: Documentation':
|
||||
# 'Feature: Enum':
|
||||
# 'Feature: Generator':
|
||||
'Feature: OAS 3.0 spec support':
|
||||
- '\s*?\[oas3[\.0]?\]\s*?'
|
||||
# 'General: Awaiting feedback':
|
||||
'General: Discussion':
|
||||
- '\s*?\[discussion\]\s*?'
|
||||
'General: Question':
|
||||
- '\s*?\[question\]\s*?'
|
||||
'General: Suggestion':
|
||||
- '\s*?\[suggestion\]\s*?'
|
||||
'General: Support':
|
||||
- '\s*?\[support\]\s*?'
|
||||
'Issue: Bug':
|
||||
- '\s*?\[bug(s)?\]\s*?'
|
||||
- '\s*?\[fix(es)?\]\s*?'
|
||||
# 'Issue: Invalid spec':
|
||||
# 'Issue: Migration':
|
||||
# 'Issue: Non-operational':
|
||||
# 'Issue: Platform':
|
||||
# 'Issue: Regression':
|
||||
'Issue: Security':
|
||||
- '\s*?\[security\]\s*?'
|
||||
# 'Issue: Unable to reproduce':
|
||||
# 'Issue: Undo changes':
|
||||
# 'Issue: Usage/Installation':
|
||||
# 'Issue: Workaround available':
|
||||
'OpenAPI Generator CLI':
|
||||
- '\s*?\[cli\]\s*?'
|
||||
'OpenAPI Generator Gradle Plugin':
|
||||
- '\s*?\[gradle\]\s*?'
|
||||
'OpenAPI Generator Maven Plugin':
|
||||
- '\s*?\[maven\]\s*?'
|
||||
'OpenAPI Generator Online':
|
||||
- '\s*?\[online\]\s*?'
|
||||
'Schema: MySQL':
|
||||
- '\s*?\[mysql\]\s*?'
|
||||
- '\s*?-[gl] mysql\s*?'
|
||||
'Schema: GraphQL':
|
||||
- '\s*?\[graphql-schema\]\s*?'
|
||||
- '\s*?-[gl] graphql-schema\s*?'
|
||||
'Server: Ada':
|
||||
- '\s*?\[ada(-.*)?-server\]\s*?'
|
||||
- '\s*?-[gl] ada(-.*)?-server\s*?'
|
||||
'Server: C++':
|
||||
- '\s*?\[cpp(-.*)?-server\]\s*?'
|
||||
- '\s*?-[gl] cpp(-.*)?-server\s*?'
|
||||
'Server: C-Sharp':
|
||||
- '\s*?\[aspnetcore\]\s*?'
|
||||
- '\s*?-[gl] aspnetcore\s*?'
|
||||
# 'Server: Ceylon': # TODO: REMOVE UNUSED LABEL
|
||||
'Server: Eiffel':
|
||||
- '\s*?\[eiffel(-.*)?-server\]\s*?'
|
||||
- '\s*?-[gl] eiffel(-.*)?-server\s*?'
|
||||
'Server: Elixir':
|
||||
- '\s*?\[elixir(-.*)?-server\]\s*?'
|
||||
- '\s*?-[gl] elixir(-.*)?-server\s*?'
|
||||
'Server: Erlang':
|
||||
- '\s*?\[erlang-server\]\s*?'
|
||||
- '\s*?-[gl] erlang-server\s*?'
|
||||
'Server: Go':
|
||||
- '\s*?\[go(-.*)?-server\]\s*?'
|
||||
- '\s*?-[gl] go(-.*)?-server\s*?'
|
||||
'Server: GraphQL':
|
||||
- '\s*?\[graphql(-.*)?-server\]\s*?'
|
||||
- '\s*?-[gl] graphql(-.*)?-server\s*?'
|
||||
'Server: Haskell':
|
||||
- '\s*?\[haskell]\s*?'
|
||||
- '\s*?-[gl] haskell(?!-)\b'
|
||||
'Server: Java':
|
||||
- '\s*?\[java-.*?\]\s*?'
|
||||
- '\s*?-[gl] java-.*?\s*?'
|
||||
- '\s*?-[gl] jaxrs-.*?\s*?'
|
||||
'Server: Kotlin':
|
||||
- '\s*?\[ktor]\s*?'
|
||||
- '\s*?\[kotlin-spring]\s*?'
|
||||
- '\s*?\[kotlin(-.*)?-server\]\s*?'
|
||||
- '\s*?-[gl] kotlin(-.*)?-server\s*?'
|
||||
- '\s*?-[gl] kotlin-spring\s*?'
|
||||
'Server: Nodejs':
|
||||
- '\s*?\[nodejs(-.*)?-server\]\s*?'
|
||||
- '\s*?-[gl] nodejs(-.*)?-server\s*?'
|
||||
'Server: PHP':
|
||||
- '\s*?\[php-.*?\]\s*?'
|
||||
- '\s*?-[gl] php-.*?\s*?'
|
||||
'Server: Perl':
|
||||
- '\s*?\[perl(-.*)?-server\]\s*?'
|
||||
- '\s*?-g perl(-.*)?-server\s*?'
|
||||
'Server: Python':
|
||||
- '\s*?\[python-.*?\]\s*?'
|
||||
- '\s*?-[gl] python-.*?\s*?'
|
||||
'Server: Ruby':
|
||||
- '\s*?\[ruby-.*?\]\s*?'
|
||||
- '\s*?-[gl] ruby-.*?\s*?'
|
||||
'Server: Rust':
|
||||
- '\s*?\[rust(-.*)?-server\]\s*?'
|
||||
- '\s*?-[gl] rust(-.*)?-server\s*?'
|
||||
'Server: Scala':
|
||||
- '\s*?\[scala(-.*)?-server\]\s*?'
|
||||
- '\s*?-[gl] scala(-.*)?-server\s*?'
|
||||
- '\s*?\[scalatra\]\s*?'
|
||||
- '\s*?-[gl] scalatra\s*?'
|
||||
- '\s*?\[scala-finch\]\s*?'
|
||||
- '\s*?-[gl] scala-finch\s*?'
|
||||
'Server: Spring':
|
||||
- '\s*?\[spring\]\s*?'
|
||||
- '\s*?-[g] spring\s*?'
|
||||
# 'Swagger-Parser':
|
||||
'WIP':
|
||||
- '\s*?\[wip\]\s*?'
|
||||
- '\s*?\[WIP\]\s*?'
|
||||
- '\bWIP:.*?'
|
||||
'help wanted':
|
||||
- '\s*?\[help wanted\]\s*?'
|
12
.github/dependabot.yml
vendored
12
.github/dependabot.yml
vendored
@ -1,12 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
- package-ecosystem: "maven"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
allow:
|
||||
- dependency-name: "com.gradle.*"
|
53
.github/workflows/docker.yaml
vendored
53
.github/workflows/docker.yaml
vendored
@ -1,53 +0,0 @@
|
||||
name: Docker tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- Dockerfile
|
||||
- run-in-docker.sh
|
||||
- pom.xml
|
||||
- modules/openapi-generator-online/pom.xml
|
||||
- modules/openapi-generator-online/Dockerfile
|
||||
- modules/openapi-generator-cli/pom.xml
|
||||
- modules/openapi-generator-cli/Dockerfile
|
||||
pull_request:
|
||||
paths:
|
||||
- Dockerfile
|
||||
- run-in-docker.sh
|
||||
- pom.xml
|
||||
- modules/openapi-generator-online/pom.xml
|
||||
- modules/openapi-generator-online/Dockerfile
|
||||
- modules/openapi-generator-cli/pom.xml
|
||||
- modules/openapi-generator-cli/Dockerfile
|
||||
jobs:
|
||||
build:
|
||||
name: 'Build: Docker'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Test run-in-docker.sh
|
||||
shell: bash
|
||||
run: |
|
||||
sed -i 's/ -it / /g' run-in-docker.sh
|
||||
./run-in-docker.sh mvn -B clean install
|
||||
|
||||
- name: Build Dockerfile
|
||||
shell: bash
|
||||
run: docker build .
|
||||
|
||||
- name: Build modules/openapi-generator-online
|
||||
shell: bash
|
||||
run: |
|
||||
docker build modules/openapi-generator-online/ -t test
|
||||
- name: Build and test modules/openapi-generator-cli
|
||||
shell: bash
|
||||
run: |
|
||||
cp docker-entrypoint.sh ./modules/openapi-generator-cli
|
||||
docker build modules/openapi-generator-cli/ -t cli-test
|
||||
docker run --rm -v "${PWD}:/local" cli-test generate \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
|
||||
-g go \
|
||||
-o /local/out/go
|
45
.github/workflows/gradle-plugin-tests.yaml
vendored
45
.github/workflows/gradle-plugin-tests.yaml
vendored
@ -1,45 +0,0 @@
|
||||
name: Gradle plugin tests
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- modules/openapi-generator-gradle-plugin/**
|
||||
pull_request:
|
||||
paths:
|
||||
- modules/openapi-generator-gradle-plugin/**
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Gradle plugin tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'temurin'
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
~/.gradle
|
||||
!~/.gradle/caches/modules-2/modules-2.lock
|
||||
!~/.gradle/caches/*/plugin-resolution/
|
||||
!~/.m2/repository/org/openapitools/
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-test-gradle-plugin-${{ env.cache-name }}-
|
||||
${{ runner.os }}-test-gradle-plugin-
|
||||
- name: Run tests
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
||||
run: |
|
||||
./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk) # using gradle-6.8.3 via wrapper
|
||||
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
|
||||
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildDotnetSdk)
|
||||
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && gradle buildJavaResttemplateSdk) # not using gradle wrapper
|
56
.github/workflows/gradle-test.yaml
vendored
56
.github/workflows/gradle-test.yaml
vendored
@ -1,56 +0,0 @@
|
||||
name: Gradle tests (Java samples)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/client/petstore/java/**'
|
||||
- 'samples/openapi3/client/petstore/java/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/java/**'
|
||||
- 'samples/openapi3/client/petstore/java/**'
|
||||
env:
|
||||
GRADLE_VERSION: 8.7
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Gradle tests
|
||||
runs-on: ubuntu-latest
|
||||
container: gradle:jdk11
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
sample:
|
||||
- samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8
|
||||
- samples/client/petstore/java/jersey2-java8-localdatetime
|
||||
- samples/client/petstore/java/jersey2-java8
|
||||
- samples/client/petstore/java/okhttp-gson
|
||||
- samples/client/petstore/java/okhttp-gson-group-parameter
|
||||
- samples/client/petstore/java/webclient-swagger2
|
||||
- samples/client/petstore/java/native
|
||||
- samples/client/petstore/java/native-jakarta
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 11
|
||||
# Cache Gradle Dependencies
|
||||
- name: Setup Gradle Dependencies Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
|
||||
|
||||
# Cache Gradle Wrapper
|
||||
- name: Setup Gradle Wrapper Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: /bin/sh gradlew build -x test
|
108
.github/workflows/linux.yaml
vendored
108
.github/workflows/linux.yaml
vendored
@ -1,108 +0,0 @@
|
||||
name: Linux tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: 'Build: JDK ${{ matrix.java }} (${{ matrix.os }})'
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
java: [11, 17]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK ${{ matrix.java }}
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: ${{ matrix.java }}
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml', 'modules/**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('modules/openapi-generator-gradle-plugin/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: Setup Maven
|
||||
uses: s4u/setup-maven-action@v1.18.0
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
maven-version: 3.8.8
|
||||
|
||||
- name: Build with Maven
|
||||
shell: bash
|
||||
run: ./mvnw clean -nsu -B --quiet -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress install --file pom.xml
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
||||
|
||||
- name: Upload Maven build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
if: matrix.java == '11' && matrix.os == 'ubuntu-latest'
|
||||
with:
|
||||
name: artifact
|
||||
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
|
||||
|
||||
- name: Test Gradle plugin usage
|
||||
shell: bash
|
||||
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace
|
||||
|
||||
- name: Test Maven plugin integration
|
||||
if: matrix.java == '11'
|
||||
shell: bash
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
||||
run: |
|
||||
cd modules/openapi-generator-maven-plugin
|
||||
mvn clean verify -Pintegration
|
||||
|
||||
verify:
|
||||
name: Verify outputs on ${{ matrix.os }}
|
||||
needs: build
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Maven
|
||||
uses: s4u/setup-maven-action@v1.18.0
|
||||
with:
|
||||
java-version: 11
|
||||
maven-version: 3.8.8
|
||||
- name: Download build artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: artifact
|
||||
- name: Run Ensures Script
|
||||
shell: bash
|
||||
run: |
|
||||
git config --global core.fileMode false
|
||||
git config --global core.safecrlf false
|
||||
git config --global core.autocrlf true
|
||||
./mvnw clean package -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
|
||||
# test with java (jersey2) client generation only as ensure-up-to-date script is run in another job instead
|
||||
./bin/generate-samples.sh ./bin/configs/java-jersey2-8.yaml
|
||||
# test debugSupportingFiles
|
||||
./bin/generate-samples.sh ./bin/configs/go-petstore.yaml -- --global-property debugSupportingFiles
|
45
.github/workflows/maven-plugin-tests.yaml
vendored
45
.github/workflows/maven-plugin-tests.yaml
vendored
@ -1,45 +0,0 @@
|
||||
name: Maven plugin tests
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- modules/openapi-generator-maven-plugin/**
|
||||
pull_request:
|
||||
paths:
|
||||
- modules/openapi-generator-maven-plugin/**
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Maven plugin tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'temurin'
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
~/.gradle
|
||||
!~/.gradle/caches/*/plugin-resolution/
|
||||
!~/.m2/repository/org/openapitools/
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-test-maven-plugin-${{ env.cache-name }}-
|
||||
${{ runner.os }}-test-maven-plugin-
|
||||
- name: Run tests
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
||||
run: |
|
||||
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
|
||||
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
./mvnw --no-snapshot-updates --quiet clean install -f modules/openapi-generator-maven-plugin/examples/multi-module/sample-external-ref-schema/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
32
.github/workflows/misc-test.yaml
vendored
32
.github/workflows/misc-test.yaml
vendored
@ -1,32 +0,0 @@
|
||||
name: Misc Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Misc tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '2.6'
|
||||
bundler-cache: false # runs 'bundle install' and caches installed gems automatically
|
||||
- name: Detect tabs
|
||||
run: /bin/bash ./bin/utils/detect_tab_in_templates.sh
|
||||
- name: Detect changes in test files
|
||||
run: ./bin/utils/detect_test_file_changes.rb bin/utils/test_file_list.yaml
|
||||
- name: Detect carriage return
|
||||
run: /bin/bash ./bin/utils/detect_carriage_return.sh
|
||||
- name: Detect merge conflicts
|
||||
run: /bin/bash ./bin/utils/detect_merge_conflict.sh
|
||||
- name: Detect tabs
|
||||
run: /bin/bash ./bin/utils/detect_tab_in_java_class.sh
|
@ -1,19 +0,0 @@
|
||||
name: OpenAPI Generator Test Report
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ['OpenAPI Generator']
|
||||
types:
|
||||
- completed
|
||||
|
||||
# separate workflow required due to https://github.com/dorny/test-reporter#recommended-setup-for-public-repositories
|
||||
jobs:
|
||||
report:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dorny/test-reporter@v2
|
||||
with:
|
||||
artifact: surefire-test-results
|
||||
name: JUnit Test results
|
||||
path: '**/surefire-reports/TEST-*.xml'
|
||||
reporter: java-junit
|
194
.github/workflows/openapi-generator.yaml
vendored
194
.github/workflows/openapi-generator.yaml
vendored
@ -1,194 +0,0 @@
|
||||
name: OpenAPI Generator
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'temurin'
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
~/.gradle
|
||||
!~/.gradle/caches/*/plugin-resolution/
|
||||
!~/.m2/repository/org/openapitools/
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
- name: Run maven
|
||||
run: ./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
||||
- run: ls -la modules/openapi-generator-cli/target
|
||||
- name: Upload openapi-generator-cli.jar artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: openapi-generator-cli.jar
|
||||
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
|
||||
retention-days: 1
|
||||
|
||||
test:
|
||||
name: Unit tests
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'temurin'
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
~/.gradle
|
||||
!~/.gradle/caches/*/plugin-resolution/
|
||||
!~/.m2/repository/org/openapitools/
|
||||
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
- name: Run unit tests
|
||||
run: ./mvnw clean --no-snapshot-updates --batch-mode --quiet --fail-at-end test -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
||||
- name: Publish unit test reports
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: surefire-test-results
|
||||
path: '**/surefire-reports/TEST-*.xml'
|
||||
|
||||
documentation:
|
||||
name: Docs up-to-date
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'temurin'
|
||||
- name: Download openapi-generator-cli.jar artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openapi-generator-cli.jar
|
||||
path: modules/openapi-generator-cli/target
|
||||
- name: Generate docs
|
||||
run: |
|
||||
bash bin/meta-codegen.sh
|
||||
bash bin/utils/export_docs_generators.sh
|
||||
bash bin/utils/copy-to-website.sh
|
||||
bash bin/utils/export_generators_readme.sh
|
||||
- name: Verify git status
|
||||
run: |
|
||||
if [[ "$(git status --porcelain)" != "" ]]; then
|
||||
echo "UNCOMMITTED CHANGES ERROR"
|
||||
echo "There are uncommitted changes in working tree after execution of 'bin/ensure-up-to-date'"
|
||||
echo "Perform git diff"
|
||||
git --no-pager diff
|
||||
echo "Perform git status"
|
||||
git status
|
||||
echo -e "\nThis script runs in pull requests against the anticipated merge commit (as if the PR was merged now)."
|
||||
echo "When you see unexpected files here, it likely means that there are newer commits in master that you need to "
|
||||
echo -e "rebase or merge into your branch.\n"
|
||||
echo "Please run 'bin/utils/ensure-up-to-date' locally and commit changes (UNCOMMITTED CHANGES ERROR)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
samples:
|
||||
name: Samples up-to-date
|
||||
needs:
|
||||
- build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'temurin'
|
||||
- name: Download openapi-generator-cli.jar artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openapi-generator-cli.jar
|
||||
path: modules/openapi-generator-cli/target
|
||||
- name: Delete samples that are entirely generated
|
||||
run: |
|
||||
rm -rf samples/client/petstore/csharp/generichost/latest/HelloWorld
|
||||
rm -rf samples/client/petstore/csharp/generichost/latest/Tags
|
||||
|
||||
rm -rf samples/client/petstore/csharp/generichost/net8/AllOf
|
||||
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOf
|
||||
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
|
||||
rm -rf samples/client/petstore/csharp/generichost/net8/FormModels
|
||||
rm -rf samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
|
||||
rm -rf samples/client/petstore/csharp/generichost/net8/OneOf
|
||||
rm -rf samples/client/petstore/csharp/generichost/net8/Petstore
|
||||
rm -rf samples/client/petstore/csharp/generichost/net8/SourceGeneration
|
||||
rm -rf samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
|
||||
|
||||
rm -rf samples/client/petstore/csharp/generichost/standard2.0/Petstore
|
||||
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.8/AllOf
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.8/AnyOf
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.8/FormModels
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.8/OneOf
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.8/Petstore
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate
|
||||
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.7/AllOf
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.7/AnyOf
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.7/FormModels
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.7/OneOf
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.7/Petstore
|
||||
rm -rf samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate
|
||||
- name: Generate samples
|
||||
run: |
|
||||
bash bin/generate-samples.sh
|
||||
# when a sample is deleted, you have to generate it twice for all files to get created
|
||||
bash bin/generate-samples.sh
|
||||
- name: Verify git status
|
||||
run: |
|
||||
if [[ "$(git status --porcelain)" != "" ]]; then
|
||||
echo "UNCOMMITTED CHANGES ERROR"
|
||||
echo "There are uncommitted changes in working tree after execution of 'bin/generate-samples.sh'"
|
||||
echo "Perform git diff"
|
||||
git --no-pager diff
|
||||
echo "Perform git status"
|
||||
git status
|
||||
echo -e "\nThis script runs in pull requests against the anticipated merge commit (as if the PR was merged now)."
|
||||
echo "When you see unexpected files here, it likely means that there are newer commits in master that you need to "
|
||||
echo -e "rebase or merge into your branch.\n"
|
||||
echo "Please run 'bin/generate-samples.sh' locally and commit changes (UNCOMMITTED CHANGES ERROR)"
|
||||
exit 1
|
||||
fi
|
@ -1,34 +0,0 @@
|
||||
name: Samples C# .Net 8 FastEndpoints Server
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/petstore/aspnet/fastendpoints/**
|
||||
- samples/server/petstore/aspnet/fastendpoints-*/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/aspnet/fastendpoints/**
|
||||
- samples/server/petstore/aspnet/fastendpoints-*/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build .Net 8 FastEndpoints servers
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/server/petstore/aspnet/fastendpoints
|
||||
- samples/server/petstore/aspnet/fastendpoints-useApiVersioning
|
||||
- samples/server/petstore/aspnet/fastendpoints-useAuthentication
|
||||
- samples/server/petstore/aspnet/fastendpoints-useProblemDetails
|
||||
- samples/server/petstore/aspnet/fastendpoints-useRecords
|
||||
- samples/server/petstore/aspnet/fastendpoints-useResponseCaching
|
||||
- samples/server/petstore/aspnet/fastendpoints-useValidators
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.3.1
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet build Org.OpenAPITools.sln
|
39
.github/workflows/samples-c-libcurl-client.yaml
vendored
39
.github/workflows/samples-c-libcurl-client.yaml
vendored
@ -1,39 +0,0 @@
|
||||
name: Samples c libcurl client
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/client/petstore/c/**'
|
||||
- 'samples/client/petstore/c-useJsonUnformatted/**'
|
||||
- 'samples/client/others/c/bearerAuth/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/c/**'
|
||||
- 'samples/client/petstore/c-useJsonUnformatted/**'
|
||||
- 'samples/client/others/c/bearerAuth/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build c libcurl client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- 'samples/client/petstore/c/'
|
||||
- 'samples/client/petstore/c-useJsonUnformatted/'
|
||||
- 'samples/client/others/c/bearerAuth/'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Prepare
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libssl-dev libcurl4-openssl-dev
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
36
.github/workflows/samples-cpp-qt-client.yaml
vendored
36
.github/workflows/samples-cpp-qt-client.yaml
vendored
@ -1,36 +0,0 @@
|
||||
name: Samples cpp qt client
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "samples/client/petstore/cpp-qt*/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- "samples/client/petstore/cpp-qt*/**"
|
||||
|
||||
env:
|
||||
GRADLE_VERSION: 6.9
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build cpp qt client
|
||||
strategy:
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/cpp-qt
|
||||
- samples/client/petstore/cpp-qt-addDownloadProgress
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macOS-latest
|
||||
- windows-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: "6.7.1"
|
||||
target: "desktop"
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: cmake . && cmake --build . --verbose
|
39
.github/workflows/samples-dart.yaml
vendored
39
.github/workflows/samples-dart.yaml
vendored
@ -1,39 +0,0 @@
|
||||
name: Samples Dart
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
paths:
|
||||
- 'samples/openapi3/client/petstore/dart*/**'
|
||||
|
||||
jobs:
|
||||
tests-dart:
|
||||
name: Tests Dart
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 11
|
||||
cache: maven
|
||||
- name: Cache test dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: pub-cache
|
||||
with:
|
||||
path: $PUB_CACHE
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('samples/**/pubspec.*') }}
|
||||
- uses: dart-lang/setup-dart@v1
|
||||
with:
|
||||
sdk: 2.15.0
|
||||
- name: Run tests
|
||||
uses: ./.github/actions/run-samples
|
||||
with:
|
||||
name: samples.dart
|
42
.github/workflows/samples-dotnet-fx.yaml
vendored
42
.github/workflows/samples-dotnet-fx.yaml
vendored
@ -1,42 +0,0 @@
|
||||
name: Samples C# .Net Framework Clients
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/petstore/csharp/generichost/net4.7/**
|
||||
- samples/client/petstore/csharp/generichost/net4.8/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/petstore/csharp/generichost/net4.7/**
|
||||
- samples/client/petstore/csharp/generichost/net4.8/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build .Net projects
|
||||
runs-on: windows-2019
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/csharp/generichost/net4.7/AllOf
|
||||
- samples/client/petstore/csharp/generichost/net4.7/AnyOf
|
||||
- samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare
|
||||
- samples/client/petstore/csharp/generichost/net4.7/FormModels
|
||||
- samples/client/petstore/csharp/generichost/net4.7/OneOf
|
||||
- samples/client/petstore/csharp/generichost/net4.7/Petstore
|
||||
- samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate
|
||||
|
||||
- samples/client/petstore/csharp/generichost/net4.8/AllOf
|
||||
- samples/client/petstore/csharp/generichost/net4.8/AnyOf
|
||||
- samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare
|
||||
- samples/client/petstore/csharp/generichost/net4.8/FormModels
|
||||
- samples/client/petstore/csharp/generichost/net4.8/OneOf
|
||||
- samples/client/petstore/csharp/generichost/net4.8/Petstore
|
||||
- samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet build Org.OpenAPITools.sln
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet test Org.OpenAPITools.sln
|
41
.github/workflows/samples-dotnet-standard.yaml
vendored
41
.github/workflows/samples-dotnet-standard.yaml
vendored
@ -1,41 +0,0 @@
|
||||
name: Samples C# .Net Standard Client
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/petstore/csharp/generichost/standard2.0/**
|
||||
- samples/client/petstore/csharp/httpclient/standard2.0/**
|
||||
- samples/client/petstore/csharp/restsharp/standard2.0/**
|
||||
- samples/client/petstore/csharp/unityWebRequest/standard2.0/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/petstore/csharp/generichost/standard2.0/**
|
||||
- samples/client/petstore/csharp/httpclient/standard2.0/**
|
||||
- samples/client/petstore/csharp/restsharp/standard2.0/**
|
||||
- samples/client/petstore/csharp/unityWebRequest/standard2.0/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build .Net projects
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/csharp/generichost/standard2.0/Petstore/
|
||||
- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/
|
||||
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/
|
||||
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/
|
||||
# - samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.3.1
|
||||
with:
|
||||
dotnet-version: 3.1.*
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet build Org.OpenAPITools.sln
|
||||
# skip tests as petstore server it not running
|
||||
# these tests are run in appveyor instead
|
||||
#- name: Test
|
||||
# working-directory: ${{ matrix.sample }}
|
||||
# run: dotnet test Org.OpenAPITools.sln
|
36
.github/workflows/samples-dotnet6-server.yaml
vendored
36
.github/workflows/samples-dotnet6-server.yaml
vendored
@ -1,36 +0,0 @@
|
||||
name: Samples C# .Net 6 Server
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/petstore/aspnetcore-6.0/**
|
||||
- samples/server/petstore/aspnetcore-6.0-*/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/aspnetcore-6.0/**
|
||||
- samples/server/petstore/aspnetcore-6.0-*/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build .Net 6 servers
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/server/petstore/aspnetcore-6.0
|
||||
- samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse
|
||||
- samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes
|
||||
- samples/server/petstore/aspnetcore-6.0-pocoModels
|
||||
- samples/server/petstore/aspnetcore-6.0-project4Models
|
||||
- samples/server/petstore/aspnetcore-6.0-useSwashBuckle
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.3.1
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet build Org.OpenAPITools.sln
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet test Org.OpenAPITools.sln
|
@ -1,33 +0,0 @@
|
||||
name: Samples C# .Net 8 Client Echo API
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/echo_api/csharp/restsharp/net8/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/csharp/restsharp/net8/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build .Net clients
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/csharp/restsharp/net8/EchoApi
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.3.1
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
dotnet build Org.OpenAPITools.sln
|
||||
dotnet test Org.OpenAPITools.sln
|
27
.github/workflows/samples-dotnet8-client.yaml
vendored
27
.github/workflows/samples-dotnet8-client.yaml
vendored
@ -1,27 +0,0 @@
|
||||
name: Samples C# .Net 8 Client
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/petstore/csharp/restsharp/net8/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/petstore/csharp/restsharp/net8/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build .Net clients
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/
|
||||
- samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.3.1
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet build Org.OpenAPITools.sln
|
37
.github/workflows/samples-dotnet8-server.yaml
vendored
37
.github/workflows/samples-dotnet8-server.yaml
vendored
@ -1,37 +0,0 @@
|
||||
name: Samples C# .Net 8 Server
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/petstore/aspnetcore-8.0/**
|
||||
- samples/server/petstore/aspnetcore-8.0-*/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/aspnetcore-8.0/**
|
||||
- samples/server/petstore/aspnetcore-8.0-*/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build .Net 8 servers
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/server/petstore/aspnetcore-8.0
|
||||
- samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse
|
||||
- samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes
|
||||
- samples/server/petstore/aspnetcore-8.0-pocoModels
|
||||
- samples/server/petstore/aspnetcore-8.0-project4Models
|
||||
- samples/server/petstore/aspnetcore-8.0-useSwashBuckle
|
||||
- samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.3.1
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet build Org.OpenAPITools.sln
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet test Org.OpenAPITools.sln
|
45
.github/workflows/samples-dotnet8.yaml
vendored
45
.github/workflows/samples-dotnet8.yaml
vendored
@ -1,45 +0,0 @@
|
||||
name: Samples C# .Net 8 Clients
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/petstore/csharp/generichost/net8/**
|
||||
- samples/client/petstore/csharp/httpclient/net8/**
|
||||
- samples/client/petstore/csharp/restsharp/net8/**
|
||||
- samples/client/petstore/csharp/unityWebRequest/net8/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/petstore/csharp/generichost/net8/**
|
||||
- samples/client/petstore/csharp/httpclient/net8/**
|
||||
- samples/client/petstore/csharp/restsharp/net8/**
|
||||
- samples/client/petstore/csharp/unityWebRequest/net8/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build .Net projects
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/csharp/generichost/net8/AllOf
|
||||
- samples/client/petstore/csharp/generichost/net8/AnyOf
|
||||
- samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
|
||||
- samples/client/petstore/csharp/generichost/net8/FormModels
|
||||
- samples/client/petstore/csharp/generichost/net8/ManualPetstoreTests
|
||||
- samples/client/petstore/csharp/generichost/net8/ManualSourceGenerationTests
|
||||
- samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
|
||||
- samples/client/petstore/csharp/generichost/net8/OneOf
|
||||
- samples/client/petstore/csharp/generichost/net8/Petstore
|
||||
- samples/client/petstore/csharp/generichost/net8/SourceGeneration
|
||||
- samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.3.1
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet build Org.OpenAPITools.sln
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet test Org.OpenAPITools.sln
|
55
.github/workflows/samples-dotnet9.yaml
vendored
55
.github/workflows/samples-dotnet9.yaml
vendored
@ -1,55 +0,0 @@
|
||||
name: Samples C# .Net 9 Clients
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/petstore/csharp/generichost/latest/**
|
||||
- samples/client/petstore/csharp/generichost/net9/**
|
||||
- samples/client/petstore/csharp/httpclient/net9/**
|
||||
- samples/client/petstore/csharp/restsharp/net9/**
|
||||
- samples/client/petstore/csharp/unityWebRequest/net9/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/petstore/csharp/generichost/latest/**
|
||||
- samples/client/petstore/csharp/generichost/net9/**
|
||||
- samples/client/petstore/csharp/httpclient/net9/**
|
||||
- samples/client/petstore/csharp/restsharp/net9/**
|
||||
- samples/client/petstore/csharp/unityWebRequest/net9/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build .Net projects
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/csharp/generichost/latest/Tags
|
||||
- samples/client/petstore/csharp/generichost/latest/HelloWorld
|
||||
- samples/client/petstore/csharp/generichost/net9/AllOf
|
||||
- samples/client/petstore/csharp/generichost/net9/AnyOf
|
||||
- samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare
|
||||
- samples/client/petstore/csharp/generichost/net9/FormModels
|
||||
# - samples/client/petstore/csharp/generichost/net9/ManualPetstoreTests
|
||||
# - samples/client/petstore/csharp/generichost/net9/ManualSourceGenerationTests
|
||||
- samples/client/petstore/csharp/generichost/net9/NullReferenceTypes
|
||||
- samples/client/petstore/csharp/generichost/net9/OneOf
|
||||
- samples/client/petstore/csharp/generichost/net9/Petstore
|
||||
- samples/client/petstore/csharp/generichost/net9/SourceGeneration
|
||||
- samples/client/petstore/csharp/generichost/net9/UseDateTimeForDate
|
||||
# restsharp
|
||||
- samples/client/petstore/csharp/restsharp/net9/EnumMappings
|
||||
# httpclient
|
||||
- samples/client/petstore/csharp/httpclient/net9/Petstore
|
||||
# unity
|
||||
#- samples/client/petstore/csharp/unityWebRequest/net9/Petstore
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.3.1
|
||||
with:
|
||||
dotnet-version: '9.0.101'
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet build Org.OpenAPITools.sln
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet test Org.OpenAPITools.sln
|
37
.github/workflows/samples-elm.yaml
vendored
37
.github/workflows/samples-elm.yaml
vendored
@ -1,37 +0,0 @@
|
||||
name: Samples Elm
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- .github/workflows/samples-elm.yaml
|
||||
- samples/client/petstore/elm/**
|
||||
- samples/openapi3/client/elm/**
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/samples-elm.yaml
|
||||
- samples/client/petstore/elm/**
|
||||
- samples/openapi3/client/elm/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Elm clients
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/petstore/elm
|
||||
- samples/openapi3/client/elm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: jorelali/setup-elm@v6
|
||||
with:
|
||||
elm-version: 0.19.1
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
# Try to compile all .elm files
|
||||
# This fails if:
|
||||
# An .elm file couldn't be compiled
|
||||
# No .elm files were found
|
||||
# No elm.json file could be found in the root of the working directory
|
||||
run: elm make $(find . -name "*.elm") --output=/dev/null
|
35
.github/workflows/samples-erlang.yaml
vendored
35
.github/workflows/samples-erlang.yaml
vendored
@ -1,35 +0,0 @@
|
||||
name: Samples Erlang
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/echo_api/erlang-server/**
|
||||
- samples/server/petstore/erlang-server/**
|
||||
- samples/client/petstore/erlang-client/**
|
||||
- samples/client/petstore/erlang-proper/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/echo_api/erlang-server/**
|
||||
- samples/server/petstore/erlang-server/**
|
||||
- samples/client/petstore/erlang-client/**
|
||||
- samples/client/petstore/erlang-proper/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Erlang projects
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/server/echo_api/erlang-server/
|
||||
- samples/server/petstore/erlang-server/
|
||||
- samples/client/petstore/erlang-client/
|
||||
- samples/client/petstore/erlang-proper/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: '27'
|
||||
rebar3-version: '3.23.0'
|
||||
- run: rebar3 compile
|
||||
working-directory: ${{ matrix.sample }}
|
@ -1,32 +0,0 @@
|
||||
name: Go Client (Echo API)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/go/**
|
||||
- .github/workflows/samples-go-client-echo-api.yaml
|
||||
jobs:
|
||||
build:
|
||||
name: Test Go client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/go
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "stable"
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- run: go version
|
||||
- name: Run test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: go test -mod=mod -v
|
31
.github/workflows/samples-go-gin.yaml
vendored
31
.github/workflows/samples-go-gin.yaml
vendored
@ -1,31 +0,0 @@
|
||||
name: Samples Go
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/server/petstore/go-gin-api-server/**'
|
||||
- 'samples/server/petstore/go-gin-api-server-interface-only/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/server/petstore/go-gin-api-server/**'
|
||||
- 'samples/server/petstore/go-gin-api-server-interface-only/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Go
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/server/petstore/go-gin-api-server/
|
||||
- samples/server/petstore/go-gin-api-server-interface-only/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "stable"
|
||||
- run: go version
|
||||
- name: Run test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: go test -mod=mod -v
|
61
.github/workflows/samples-go.yaml
vendored
61
.github/workflows/samples-go.yaml
vendored
@ -1,61 +0,0 @@
|
||||
name: Samples Go
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/server/petstore/go-echo-server/**'
|
||||
- 'samples/server/petstore/go-api-server/**'
|
||||
- 'samples/server/petstore/go-chi-server/**'
|
||||
- 'samples/server/others/go-server/no-body-path-params/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/server/petstore/go-echo-server/**'
|
||||
- 'samples/server/petstore/go-api-server/**'
|
||||
- 'samples/server/petstore/go-chi-server/**'
|
||||
- 'samples/server/others/go-server/no-body-path-params/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Go
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/server/petstore/go-echo-server/
|
||||
- samples/server/petstore/go-api-server/
|
||||
- samples/server/petstore/go-chi-server/
|
||||
- samples/server/others/go-server/no-body-path-params/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "stable"
|
||||
- run: go version
|
||||
- name: Run test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: go test -mod=mod -v
|
||||
|
||||
verify:
|
||||
name: Verify generated Go files with Go tests
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/server/petstore/go-api-server/
|
||||
go-version:
|
||||
- "1.18"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: Install Dependencies
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
go mod tidy
|
||||
- name: Run tests
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: go test ./samples_tests -v
|
45
.github/workflows/samples-groovy.yaml
vendored
45
.github/workflows/samples-groovy.yaml
vendored
@ -1,45 +0,0 @@
|
||||
name: Samples Groovy
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/client/petstore/groovy**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/groovy**'
|
||||
|
||||
env:
|
||||
GRADLE_VERSION: 6.9
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Groovy
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/groovy
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 8
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.gradle
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Install Gradle wrapper
|
||||
uses: eskatos/gradle-command-action@v3
|
||||
with:
|
||||
gradle-version: ${{ env.GRADLE_VERSION }}
|
||||
build-root-directory: ${{ matrix.sample }}
|
||||
arguments: wrapper
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: ./gradlew build -x test
|
39
.github/workflows/samples-haskell.yaml
vendored
39
.github/workflows/samples-haskell.yaml
vendored
@ -1,39 +0,0 @@
|
||||
name: Samples Haskell
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/petstore/haskell-yesod/**
|
||||
- samples/server/petstore/haskell-servant/**
|
||||
- samples/server/others/haskell-servant-ping/**
|
||||
- samples/client/petstore/haskell-http-client/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/haskell-yesod/**
|
||||
- samples/server/petstore/haskell-servant/**
|
||||
- samples/server/others/haskell-servant-ping/**
|
||||
- samples/client/petstore/haskell-http-client/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build stack projects
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# servers
|
||||
- samples/server/petstore/haskell-yesod/
|
||||
- samples/server/petstore/haskell-servant/
|
||||
- samples/server/others/haskell-servant-ping/
|
||||
- samples/client/petstore/haskell-http-client/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: haskell/actions/setup@v2
|
||||
with:
|
||||
# ghc-version: '8.8.4' # Exact version of ghc to use
|
||||
# cabal-version: 'latest'. Omitted, but defaults to 'latest'
|
||||
enable-stack: true
|
||||
stack-version: 'latest'
|
||||
- name: stack test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: stack test
|
@ -1,46 +0,0 @@
|
||||
name: Java Client (Echo API) JDK11
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/echo_api/java/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/java/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Client JDK11
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/java/apache-httpclient
|
||||
- samples/client/echo_api/java/native
|
||||
- samples/client/echo_api/java/feign-gson
|
||||
- samples/client/echo_api/java/resttemplate
|
||||
- samples/client/echo_api/java/resteasy
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 11
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
@ -1,47 +0,0 @@
|
||||
name: Java Client (Echo API) JDK17
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/echo_api/java/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/java/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Client JDK17
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/java/apache-httpclient
|
||||
- samples/client/echo_api/java/native
|
||||
- samples/client/echo_api/java/feign-gson
|
||||
- samples/client/echo_api/java/resttemplate
|
||||
- samples/client/echo_api/java/resteasy
|
||||
- samples/client/echo_api/java/restclient
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
@ -1,53 +0,0 @@
|
||||
name: Java Client (Echo API) JDK8
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/echo_api/java/apache-httpclient/**
|
||||
- samples/client/echo_api/java/feign-gson/**
|
||||
- samples/client/echo_api/java/okhttp-gson/**
|
||||
- samples/client/echo_api/java/resttemplate/**
|
||||
- samples/client/echo_api/java/resteasy/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/java/apache-httpclient/**
|
||||
- samples/client/echo_api/java/feign-gson/**
|
||||
- samples/client/echo_api/java/okhttp-gson/**
|
||||
- samples/client/echo_api/java/resteasy/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Client JDK8
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/java/apache-httpclient
|
||||
- samples/client/echo_api/java/feign-gson
|
||||
- samples/client/echo_api/java/okhttp-gson
|
||||
- samples/client/echo_api/java/resttemplate
|
||||
- samples/client/echo_api/java/resteasy
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 8
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
115
.github/workflows/samples-java-client-jdk11.yaml
vendored
115
.github/workflows/samples-java-client-jdk11.yaml
vendored
@ -1,115 +0,0 @@
|
||||
name: Samples Java Client JDK11
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/client/petstore/java/**'
|
||||
- samples/client/petstore/jaxrs-cxf-client/**
|
||||
- samples/client/petstore/java-micronaut-client/**
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters/**
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/**
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/**
|
||||
- samples/openapi3/client/petstore/java/native**
|
||||
- samples/client/others/java/okhttp-gson-oneOf/**
|
||||
- samples/client/others/java/okhttp-gson-oneOf-array/**
|
||||
- samples/client/others/java/resttemplate-useAbstractionForFiles/**
|
||||
- samples/client/others/java/webclient-useAbstractionForFiles/**
|
||||
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
|
||||
- samples/client/others/java/jersey2-oneOf-duplicates/**
|
||||
- samples/client/others/java/jersey2-oneOf-Mixed/**
|
||||
- samples/client/others/java/resttemplate-list-schema-validation/**
|
||||
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/**
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/java/**'
|
||||
- samples/client/petstore/jaxrs-cxf-client/**
|
||||
- samples/client/petstore/java-micronaut-client/**
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters/**
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/**
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/**
|
||||
- samples/openapi3/client/petstore/java/native**
|
||||
- samples/client/others/java/okhttp-gson-oneOf/**
|
||||
- samples/client/others/java/okhttp-gson-oneOf-array/**
|
||||
- samples/client/others/java/resttemplate-useAbstractionForFiles/**
|
||||
- samples/client/others/java/webclient-useAbstractionForFiles/**
|
||||
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
|
||||
- samples/client/others/java/jersey2-oneOf-duplicates/**
|
||||
- samples/client/others/java/jersey2-oneOf-Mixed/**
|
||||
- samples/client/others/java/resttemplate-list-schema-validation/**
|
||||
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Client JDK11
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/petstore/jaxrs-cxf-client
|
||||
- samples/client/petstore/java/native
|
||||
- samples/client/petstore/java/native-async
|
||||
- samples/client/petstore/java/native-jakarta
|
||||
- samples/client/petstore/java/retrofit2
|
||||
- samples/client/petstore/java/retrofit2rx2
|
||||
- samples/client/petstore/java/retrofit2rx3
|
||||
- samples/client/petstore/java/retrofit2-play26
|
||||
- samples/client/petstore/java/resttemplate
|
||||
- samples/client/petstore/java/resttemplate-withXml
|
||||
- samples/client/petstore/java/webclient
|
||||
- samples/client/petstore/java/webclient-nullable-arrays
|
||||
- samples/client/petstore/java/webclient-swagger2
|
||||
- samples/client/petstore/java/webclient-useSingleRequestParameter
|
||||
- samples/client/petstore/java/vertx
|
||||
- samples/client/petstore/java/vertx-no-nullable
|
||||
- samples/client/petstore/java/vertx-supportVertxFuture
|
||||
- samples/client/petstore/java/jersey2-java8-localdatetime
|
||||
- samples/client/petstore/java/google-api-client
|
||||
- samples/client/petstore/java/rest-assured
|
||||
- samples/client/petstore/java/rest-assured-jackson
|
||||
- samples/client/petstore/java/microprofile-rest-client
|
||||
- samples/client/petstore/java/microprofile-rest-client-mutiny
|
||||
- samples/client/petstore/java/microprofile-rest-client-3.0
|
||||
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson
|
||||
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml
|
||||
- samples/client/petstore/java/microprofile-rest-client-3.0-mutiny
|
||||
- samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter
|
||||
- samples/client/petstore/java/apache-httpclient
|
||||
- samples/client/petstore/java/feign
|
||||
- samples/client/petstore/java/feign-hc5
|
||||
- samples/client/petstore/java/feign-no-nullable
|
||||
- samples/client/petstore/java/okhttp-gson-awsv4signature
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters
|
||||
- samples/openapi3/client/petstore/java/native
|
||||
- samples/client/petstore/java/okhttp-gson-swagger1/
|
||||
- samples/client/petstore/java/resttemplate-swagger1/
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger1/
|
||||
- samples/client/petstore/java/okhttp-gson-swagger2/
|
||||
- samples/client/petstore/java/resttemplate-swagger2/
|
||||
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/
|
||||
- samples/client/others/java/okhttp-gson-oneOf/
|
||||
- samples/client/others/java/okhttp-gson-oneOf-array/
|
||||
- samples/client/echo_api/java/okhttp-gson-user-defined-templates/
|
||||
- samples/client/others/java/resttemplate-useAbstractionForFiles/
|
||||
- samples/client/others/java/webclient-useAbstractionForFiles/
|
||||
- samples/client/others/java/jersey2-oneOf-duplicates/
|
||||
- samples/client/others/java/jersey2-oneOf-Mixed/
|
||||
- samples/client/others/java/resttemplate-list-schema-validation/
|
||||
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 11
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
70
.github/workflows/samples-java-client-jdk17.yaml
vendored
70
.github/workflows/samples-java-client-jdk17.yaml
vendored
@ -1,70 +0,0 @@
|
||||
name: Samples Java Client JDK17
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/petstore/java/resttemplate-jakarta/**
|
||||
- samples/client/petstore/java/webclient-jakarta/**
|
||||
- samples/client/petstore/java/restclient-*/**
|
||||
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/petstore/java/resttemplate-jakarta/**
|
||||
- samples/client/petstore/java/webclient-jakarta/**
|
||||
- samples/client/petstore/java/restclient-*/**
|
||||
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Client JDK17
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/petstore/java/resttemplate-jakarta
|
||||
- samples/client/petstore/java/webclient-jakarta
|
||||
- samples/client/petstore/java/restclient
|
||||
- samples/client/petstore/java/restclient-nullable-arrays
|
||||
- samples/client/petstore/java/restclient-swagger2
|
||||
- samples/client/petstore/java/restclient-useSingleRequestParameter
|
||||
- samples/client/petstore/java/restclient-useSingleRequestParameter-static
|
||||
- samples/client/petstore/java/webclient-useSingleRequestParameter
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
|
||||
- name: Build with Maven
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
||||
|
||||
- name: Cache gradle dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: gradle-caches
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
|
||||
|
||||
- name: Cache gradle wrapper
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: gradle-wrapper
|
||||
with:
|
||||
path: ~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: ./gradlew build -x test
|
44
.github/workflows/samples-java-helidon-v3.yaml
vendored
44
.github/workflows/samples-java-helidon-v3.yaml
vendored
@ -1,44 +0,0 @@
|
||||
name: Samples Java Helidon v3
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/petstore/java-helidon-client/v3/**
|
||||
- samples/server/petstore/java-helidon-server/v3/**
|
||||
- samples/server/others/java-helidon-server/v3/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/petstore/java-helidon-client/v3/**
|
||||
- samples/server/petstore/java-helidon-server/v3/**
|
||||
- samples/server/others/java-helidon-server/v3/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Helidon
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/java-helidon-client/v3/mp
|
||||
- samples/client/petstore/java-helidon-client/v3/se
|
||||
- samples/server/petstore/java-helidon-server/v3/mp
|
||||
- samples/server/petstore/java-helidon-server/v3/se
|
||||
- samples/server/others/java-helidon-server/v3/mp-format-test
|
||||
version: [17]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: ${{ matrix.version }}
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
45
.github/workflows/samples-java-helidon-v4.yaml
vendored
45
.github/workflows/samples-java-helidon-v4.yaml
vendored
@ -1,45 +0,0 @@
|
||||
name: Samples Java Helidon v4
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/petstore/java-helidon-client/v4/**
|
||||
- samples/server/petstore/java-helidon-server/v4/**
|
||||
- samples/server/others/java-helidon-server/v4/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/petstore/java-helidon-client/v4/**
|
||||
- samples/server/petstore/java-helidon-server/v4/**
|
||||
- samples/server/others/java-helidon-server/v4/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Helidon
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/java-helidon-client/v4/mp
|
||||
- samples/client/petstore/java-helidon-client/v4/se
|
||||
- samples/server/petstore/java-helidon-server/v4/mp
|
||||
- samples/server/petstore/java-helidon-server/v4/se
|
||||
- samples/server/petstore/java-helidon-server/v4/se-uac
|
||||
- samples/server/others/java-helidon-server/v4/mp-format-test
|
||||
version: [21]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: ${{ matrix.version }}
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
@ -1,47 +0,0 @@
|
||||
name: Samples Java Play Framework
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/server/petstore/java-play-framework**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/server/petstore/java-play-framework**'
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Play Framework
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# servers
|
||||
- samples/server/petstore/java-play-framework
|
||||
- samples/server/petstore/java-play-framework-api-package-override
|
||||
- samples/server/petstore/java-play-framework-async
|
||||
- samples/server/petstore/java-play-framework-controller-only
|
||||
- samples/server/petstore/java-play-framework-fake-endpoints
|
||||
- samples/server/petstore/java-play-framework-fake-endpoints-with-security
|
||||
- samples/server/petstore/java-play-framework-no-bean-validation
|
||||
- samples/server/petstore/java-play-framework-no-exception-handling
|
||||
- samples/server/petstore/java-play-framework-no-interface
|
||||
- samples/server/petstore/java-play-framework-no-nullable
|
||||
- samples/server/petstore/java-play-framework-no-swagger-ui
|
||||
- samples/server/petstore/java-play-framework-no-wrap-calls
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 11
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
49
.github/workflows/samples-java-server-jdk8.yaml
vendored
49
.github/workflows/samples-java-server-jdk8.yaml
vendored
@ -1,49 +0,0 @@
|
||||
name: Samples Java Server
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/server/petstore/java-vertx-web/**'
|
||||
- 'samples/server/petstore/java-inflector/**'
|
||||
- 'samples/server/petstore/java-pkmst/**'
|
||||
# test in circleci instead
|
||||
- 'samples/server/petstore/java-undertow/**'
|
||||
- 'samples/server/petstore/java-microprofile/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/server/petstore/java-vertx-web/**'
|
||||
- 'samples/server/petstore/java-inflector/**'
|
||||
- 'samples/server/petstore/java-pkmst/**'
|
||||
#- 'samples/server/petstore/java-undertow/**'
|
||||
- 'samples/server/petstore/java-microprofile/**'
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Server
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# servers
|
||||
- samples/server/petstore/java-vertx-web/
|
||||
- samples/server/petstore/java-inflector/
|
||||
- samples/server/petstore/java-pkmst/
|
||||
#- samples/server/petstore/java-undertow/
|
||||
- samples/server/petstore/java-microprofile/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 8
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
35
.github/workflows/samples-java-wiremock.yaml
vendored
35
.github/workflows/samples-java-wiremock.yaml
vendored
@ -1,35 +0,0 @@
|
||||
name: Samples Java Wiremock
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/petstore/java-wiremock/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/java-wiremock/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Wiremock
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/server/petstore/java-wiremock
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 11
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
36
.github/workflows/samples-jaxrs-jdk11.yaml
vendored
36
.github/workflows/samples-jaxrs-jdk11.yaml
vendored
@ -1,36 +0,0 @@
|
||||
name: Samples JAX-RS (JDK11)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/petstore/jaxrs/jersey3/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/jaxrs/jersey3/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build JAX-RS
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# servers
|
||||
- samples/server/petstore/jaxrs/jersey3
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 11
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
56
.github/workflows/samples-jaxrs.yaml
vendored
56
.github/workflows/samples-jaxrs.yaml
vendored
@ -1,56 +0,0 @@
|
||||
name: Samples JAX-RS
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/server/petstore/jaxrs*/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/server/petstore/jaxrs*/**'
|
||||
jobs:
|
||||
build:
|
||||
name: Build JAX-RS
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# servers
|
||||
- samples/server/petstore/jaxrs/jersey2
|
||||
- samples/server/petstore/jaxrs/jersey2-useTags
|
||||
- samples/server/petstore/jaxrs-jersey
|
||||
- samples/server/petstore/jaxrs-spec
|
||||
- samples/server/petstore/jaxrs-spec-interface
|
||||
- samples/server/petstore/jaxrs-spec-interface-response
|
||||
- samples/server/petstore/jaxrs-jersey
|
||||
- samples/server/petstore/jaxrs-spec
|
||||
- samples/server/petstore/jaxrs-spec-interface
|
||||
- samples/server/petstore/jaxrs-spec-interface-response
|
||||
- samples/server/petstore/jaxrs-datelib-j8
|
||||
- samples/server/petstore/jaxrs-resteasy/default
|
||||
- samples/server/petstore/jaxrs-resteasy/eap
|
||||
- samples/server/petstore/jaxrs-resteasy/eap-joda
|
||||
- samples/server/petstore/jaxrs-resteasy/eap-java8
|
||||
- samples/server/petstore/jaxrs-resteasy/joda
|
||||
- samples/server/petstore/jaxrs-cxf
|
||||
- samples/server/petstore/jaxrs-cxf-annotated-base-path
|
||||
- samples/server/petstore/jaxrs-cxf-cdi
|
||||
- samples/server/petstore/jaxrs-cxf-non-spring-app
|
||||
- samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 8
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
76
.github/workflows/samples-jdk17.yaml
vendored
76
.github/workflows/samples-jdk17.yaml
vendored
@ -1,76 +0,0 @@
|
||||
name: Samples JDK17
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
# clients
|
||||
- samples/openapi3/client/petstore/spring-cloud-3/**
|
||||
- samples/client/petstore/java-helidon-client/v3/mp/**
|
||||
- samples/client/petstore/java-helidon-client/v3/se/**
|
||||
- samples/client/petstore/spring-http-interface-reactive/**
|
||||
- samples/client/petstore/spring-http-interface/**
|
||||
- samples/client/petstore/spring-http-interface-reactive-noResponseEntity/**
|
||||
- samples/client/petstore/spring-http-interface-noResponseEntity/**
|
||||
- samples/client/petstore/java/webclient-jakarta/**
|
||||
- samples/client/petstore/java/microprofile-rest-client-outer-enum/**
|
||||
# servers
|
||||
- samples/openapi3/server/petstore/springboot-3/**
|
||||
- samples/server/petstore/java-camel/**
|
||||
- samples/server/petstore/java-helidon-server/v3/mp/**
|
||||
- samples/server/petstore/java-helidon-server/v3/se/**
|
||||
pull_request:
|
||||
paths:
|
||||
# clients
|
||||
- samples/openapi3/client/petstore/spring-cloud-3/**
|
||||
- samples/client/petstore/java-helidon-client/v3/mp/**
|
||||
- samples/client/petstore/java-helidon-client/v3/se/**
|
||||
- samples/client/petstore/spring-http-interface-reactive/**
|
||||
- samples/client/petstore/spring-http-interface/**
|
||||
- samples/client/petstore/spring-http-interface-reactive-noResponseEntity/**
|
||||
- samples/client/petstore/spring-http-interface-noResponseEntity/**
|
||||
- samples/client/petstore/java/webclient-jakarta/**
|
||||
- samples/client/petstore/java/microprofile-rest-client-outer-enum/**
|
||||
# servers
|
||||
- samples/openapi3/server/petstore/springboot-3/**
|
||||
- samples/server/petstore/java-camel/**
|
||||
- samples/server/petstore/java-helidon-server/v3/mp/**
|
||||
- samples/server/petstore/java-helidon-server/v3/se/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build with JDK17
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/openapi3/client/petstore/spring-cloud-3
|
||||
- samples/client/petstore/java-helidon-client/v3/mp/
|
||||
- samples/client/petstore/java-helidon-client/v3/se
|
||||
- samples/client/petstore/spring-http-interface-reactive
|
||||
- samples/client/petstore/spring-http-interface
|
||||
- samples/client/petstore/spring-http-interface-reactive-noResponseEntity
|
||||
- samples/client/petstore/spring-http-interface-noResponseEntity
|
||||
- samples/client/petstore/java/webclient-jakarta
|
||||
- samples/client/petstore/java/microprofile-rest-client-outer-enum
|
||||
# servers
|
||||
- samples/openapi3/server/petstore/springboot-3
|
||||
- samples/server/petstore/java-camel/
|
||||
- samples/server/petstore/java-helidon-server/v3/mp/
|
||||
- samples/server/petstore/java-helidon-server/v3/se
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
49
.github/workflows/samples-jdk21.yaml
vendored
49
.github/workflows/samples-jdk21.yaml
vendored
@ -1,49 +0,0 @@
|
||||
name: Samples JDK21
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
# clients
|
||||
- samples/client/petstore/java-helidon-client/v4/mp/**
|
||||
- samples/client/petstore/java-helidon-client/v4/se/**
|
||||
# servers
|
||||
- samples/server/petstore/java-helidon-server/v4/mp/**
|
||||
- samples/server/petstore/java-helidon-server/v4/se/**
|
||||
pull_request:
|
||||
paths:
|
||||
# clients
|
||||
- samples/client/petstore/java-helidon-client/v4/mp/**
|
||||
- samples/client/petstore/java-helidon-client/v4/se/**
|
||||
# servers
|
||||
- samples/server/petstore/java-helidon-server/v4/mp/**
|
||||
- samples/server/petstore/java-helidon-server/v4/se/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build with JDK21
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/petstore/java-helidon-client/v4/mp/
|
||||
- samples/client/petstore/java-helidon-client/v4/se/
|
||||
# servers
|
||||
- samples/server/petstore/java-helidon-server/v4/mp/
|
||||
- samples/server/petstore/java-helidon-server/v4/se/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 21
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
41
.github/workflows/samples-julia.yaml
vendored
41
.github/workflows/samples-julia.yaml
vendored
@ -1,41 +0,0 @@
|
||||
name: Samples Julia
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/client/petstore/julia/**'
|
||||
- 'samples/server/petstore/julia/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/julia/**'
|
||||
- 'samples/server/petstore/julia/**'
|
||||
|
||||
jobs:
|
||||
tests-julia:
|
||||
name: Tests Julia
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: julia-actions/setup-julia@v2
|
||||
with:
|
||||
version: 1.8
|
||||
arch: x64
|
||||
- name: Test
|
||||
shell: bash
|
||||
working-directory: 'samples'
|
||||
run: |
|
||||
currdir=`pwd`
|
||||
# Using a specific version of OpenAPI.jl helps avoid introducing version inter-dependencies
|
||||
# and allows breaking changes to be done in either repos independently
|
||||
# Using develop mode to install package so that it is easier to modify the package test files
|
||||
julia -e "using Pkg; Pkg.develop(\"OpenAPI\");"
|
||||
cd ~/.julia/dev/OpenAPI
|
||||
git checkout v0.2.0
|
||||
cd $currdir
|
||||
rm -rf ~/.julia/dev/OpenAPI/test/client/openapigenerator_petstore_v3/petstore
|
||||
rm -rf ~/.julia/dev/OpenAPI/test/server/openapigenerator_petstore_v3/petstore
|
||||
cp -r client/petstore/julia ~/.julia/dev/OpenAPI/test/client/openapigenerator_petstore_v3/petstore
|
||||
cp -r server/petstore/julia ~/.julia/dev/OpenAPI/test/server/openapigenerator_petstore_v3/petstore
|
||||
# setting this env runs only the tests relevant to the openapi-generator repo
|
||||
export OPENAPI_GENERATOR=true
|
||||
julia -e "using Pkg; Pkg.test(\"OpenAPI\");"
|
89
.github/workflows/samples-kotlin-client.yaml
vendored
89
.github/workflows/samples-kotlin-client.yaml
vendored
@ -1,89 +0,0 @@
|
||||
name: Samples Kotlin client
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'samples/client/petstore/kotlin*/**'
|
||||
- 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/kotlin*/**'
|
||||
- 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Kotlin client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# client
|
||||
- samples/client/petstore/kotlin
|
||||
- samples/client/petstore/kotlin-explicit
|
||||
- samples/client/petstore/kotlin-gson
|
||||
- samples/client/petstore/kotlin-jackson
|
||||
- samples/client/petstore/kotlin-model-prefix-type-mappings
|
||||
# needs Android configured
|
||||
#- samples/client/petstore/kotlin-json-request-string
|
||||
- samples/client/petstore/kotlin-jvm-okhttp4-coroutines
|
||||
- samples/client/petstore/kotlin-jvm-volley
|
||||
- samples/client/petstore/kotlin-moshi-codegen
|
||||
- samples/client/petstore/kotlin-multiplatform
|
||||
- samples/client/petstore/kotlin-multiplatform-kotlinx-datetime
|
||||
- samples/client/petstore/kotlin-nonpublic
|
||||
- samples/client/petstore/kotlin-nullable
|
||||
- samples/client/petstore/kotlin-retrofit2
|
||||
- samples/client/petstore/kotlin-retrofit2-kotlinx_serialization
|
||||
- samples/client/petstore/kotlin-retrofit2-jackson
|
||||
- samples/client/petstore/kotlin-retrofit2-rx3
|
||||
- samples/client/petstore/kotlin-string
|
||||
- samples/client/petstore/kotlin-threetenbp
|
||||
- samples/client/petstore/kotlin-kotlinx-datetime
|
||||
- samples/client/petstore/kotlin-uppercase-enum
|
||||
- samples/client/petstore/kotlin-default-values-jvm-okhttp4
|
||||
- samples/client/petstore/kotlin-default-values-jvm-retrofit2
|
||||
- samples/client/petstore/kotlin-default-values-jvm-volley
|
||||
- samples/client/petstore/kotlin-default-values-multiplatform
|
||||
- samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4
|
||||
- samples/client/petstore/kotlin-array-simple-string-jvm-volley
|
||||
- samples/client/petstore/kotlin-array-simple-string-multiplatform
|
||||
- samples/client/petstore/kotlin-bigdecimal-default-multiplatform
|
||||
- samples/client/petstore/kotlin-bigdecimal-default-okhttp4
|
||||
- samples/client/petstore/kotlin-jvm-jackson
|
||||
- samples/client/petstore/kotlin-jvm-ktor-jackson
|
||||
- samples/client/petstore/kotlin-jvm-ktor-gson
|
||||
- samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization
|
||||
- samples/client/petstore/kotlin-jvm-vertx-gson
|
||||
- samples/client/petstore/kotlin-jvm-vertx-jackson
|
||||
- samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines
|
||||
- samples/client/petstore/kotlin-jvm-vertx-moshi
|
||||
- samples/client/petstore/kotlin-jvm-spring-2-webclient
|
||||
- samples/client/petstore/kotlin-jvm-spring-3-webclient
|
||||
- samples/client/echo_api/kotlin-jvm-spring-3-webclient
|
||||
- samples/client/petstore/kotlin-jvm-spring-3-restclient
|
||||
- samples/client/echo_api/kotlin-jvm-spring-3-restclient
|
||||
- samples/client/petstore/kotlin-name-parameter-mappings
|
||||
- samples/client/others/kotlin-jvm-okhttp-parameter-tests
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 11
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.gradle
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Install Gradle wrapper
|
||||
uses: eskatos/gradle-command-action@v3
|
||||
with:
|
||||
build-root-directory: ${{ matrix.sample }}
|
||||
arguments: wrapper
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: ./gradlew build -x test
|
50
.github/workflows/samples-kotlin-echo-api.yaml
vendored
50
.github/workflows/samples-kotlin-echo-api.yaml
vendored
@ -1,50 +0,0 @@
|
||||
name: Kotlin Client (Echo API) JDK17
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/echo_api/kotlin**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/kotlin**
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Kotlin Client JDK17
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/kotlin-jvm-spring-3-restclient
|
||||
- samples/client/echo_api/kotlin-model-prefix-type-mappings
|
||||
- samples/client/echo_api/kotlin-jvm-okhttp
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.gradle
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Install Gradle wrapper
|
||||
uses: eskatos/gradle-command-action@v3
|
||||
with:
|
||||
build-root-directory: ${{ matrix.sample }}
|
||||
arguments: wrapper
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: ./gradlew build
|
@ -1,70 +0,0 @@
|
||||
name: Samples Kotlin server (jdk17)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/server/petstore/kotlin-springboot-3*/**'
|
||||
- 'samples/server/petstore/kotlin-server/**'
|
||||
- 'samples/server/petstore/kotlin-server-modelMutable/**'
|
||||
- 'samples/server/petstore/kotlin-springboot-*/**'
|
||||
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
|
||||
# comment out due to gradle build failure
|
||||
# - samples/server/petstore/kotlin-spring-default/**
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/server/petstore/kotlin-springboot-3*/**'
|
||||
- 'samples/server/petstore/kotlin-server/**'
|
||||
- 'samples/server/petstore/kotlin-server-modelMutable/**'
|
||||
- 'samples/server/petstore/kotlin-springboot-*/**'
|
||||
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
|
||||
# comment out due to gradle build failure
|
||||
# - samples/server/petstore/kotlin-spring-default/**
|
||||
|
||||
env:
|
||||
GRADLE_VERSION: '8.10'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Kotlin server (jdk17)
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# server
|
||||
- samples/server/petstore/kotlin-server-required-and-nullable-properties
|
||||
- samples/server/petstore/kotlin-springboot-3
|
||||
- samples/server/petstore/kotlin-springboot-delegate-nodefaults
|
||||
- samples/server/petstore/kotlin-springboot-request-cookie
|
||||
- samples/server/petstore/kotlin-server/jaxrs-spec
|
||||
- samples/server/petstore/kotlin-server/jaxrs-spec-mutiny
|
||||
- samples/server/petstore/kotlin-server/javalin
|
||||
- samples/server/petstore/kotlin-server/javalin-6
|
||||
- samples/server/petstore/kotlin-server/ktor
|
||||
- samples/server/petstore/kotlin-server/ktor2
|
||||
- samples/server/petstore/kotlin-misk
|
||||
# comment out due to gradle build failure
|
||||
# - samples/server/petstore/kotlin-spring-default/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.gradle
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Install Gradle wrapper
|
||||
uses: eskatos/gradle-command-action@v3
|
||||
with:
|
||||
gradle-version: ${{ env.GRADLE_VERSION }}
|
||||
build-root-directory: ${{ matrix.sample }}
|
||||
arguments: wrapper
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: ./gradlew build -x test
|
@ -1,51 +0,0 @@
|
||||
name: Samples Kotlin server (jdk21)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/server/petstore/kotlin-server/**'
|
||||
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/server/petstore/kotlin-server/**'
|
||||
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
|
||||
|
||||
env:
|
||||
GRADLE_VERSION: '8.10'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Kotlin server (jdk21)
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/server/petstore/kotlin-server/javalin-6
|
||||
- samples/server/petstore/kotlin-server/ktor
|
||||
- samples/server/petstore/kotlin-server/ktor2
|
||||
- samples/server/petstore/kotlin-server-required-and-nullable-properties
|
||||
- samples/server/petstore/kotlin-misk
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 21
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.gradle
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Install Gradle wrapper
|
||||
uses: eskatos/gradle-command-action@v3
|
||||
with:
|
||||
gradle-version: ${{ env.GRADLE_VERSION }}
|
||||
build-root-directory: ${{ matrix.sample }}
|
||||
arguments: wrapper
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: ./gradlew build -x test
|
78
.github/workflows/samples-kotlin-server.yaml
vendored
78
.github/workflows/samples-kotlin-server.yaml
vendored
@ -1,78 +0,0 @@
|
||||
name: Samples Kotlin server (jdk8)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/others/kotlin-server/jaxrs-spec/**
|
||||
- 'samples/server/petstore/kotlin*/**'
|
||||
- 'samples/server/others/kotlin-server/jaxrs-spec-array-response/**'
|
||||
# comment out due to gradle build failure
|
||||
#- samples/server/petstore/kotlin-spring-default/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/others/kotlin-server/jaxrs-spec/**
|
||||
- 'samples/server/petstore/kotlin*/**'
|
||||
- 'samples/server/others/kotlin-server/jaxrs-spec-array-response/**'
|
||||
# comment out due to gradle build failure
|
||||
# - samples/server/petstore/kotlin-spring-default/**
|
||||
|
||||
env:
|
||||
GRADLE_VERSION: 7.6.4
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Kotlin server (jdk8)
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# server
|
||||
- samples/server/petstore/kotlin-springboot
|
||||
- samples/server/petstore/kotlin-springboot-multipart-request-model
|
||||
- samples/server/petstore/kotlin-springboot-bigdecimal-default
|
||||
- samples/server/petstore/kotlin-springboot-delegate
|
||||
- samples/server/petstore/kotlin-springboot-modelMutable
|
||||
- samples/server/petstore/kotlin-springboot-reactive
|
||||
- samples/server/petstore/kotlin-springboot-reactive-without-flow
|
||||
- samples/server/petstore/kotlin-springboot-source-swagger1
|
||||
- samples/server/petstore/kotlin-springboot-source-swagger2
|
||||
- samples/server/petstore/kotlin-springboot-springfox
|
||||
- samples/server/petstore/kotlin-server/ktor
|
||||
- samples/server/petstore/kotlin-server/ktor2
|
||||
- samples/server/petstore/kotlin-server/jaxrs-spec
|
||||
- samples/server/petstore/kotlin-server/jaxrs-spec-mutiny
|
||||
- samples/server/petstore/kotlin-server-modelMutable
|
||||
- samples/server/petstore/kotlin-server/javalin
|
||||
- samples/server/others/kotlin-server/jaxrs-spec
|
||||
- samples/server/others/kotlin-server/jaxrs-spec-array-response
|
||||
- samples/server/petstore/kotlin-spring-cloud
|
||||
- samples/server/petstore/kotlin-misk
|
||||
- samples/server/petstore/kotlin-misk-config
|
||||
# comment out due to gradle build failure
|
||||
#- samples/server/petstore/kotlin-spring-default
|
||||
# no build.gradle file
|
||||
#- samples/server/petstore/kotlin-vertx-modelMutable
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 8
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.gradle
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Install Gradle wrapper
|
||||
uses: eskatos/gradle-command-action@v3
|
||||
with:
|
||||
gradle-version: ${{ env.GRADLE_VERSION }}
|
||||
build-root-directory: ${{ matrix.sample }}
|
||||
arguments: wrapper
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: ./gradlew build -x test
|
45
.github/workflows/samples-kotlin-wiremock.yaml
vendored
45
.github/workflows/samples-kotlin-wiremock.yaml
vendored
@ -1,45 +0,0 @@
|
||||
name: Samples Kotlin WireMock
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- samples/server/petstore/kotlin-wiremock*/**
|
||||
- samples/server/echo_api/kotlin-wiremock/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/kotlin-wiremock*/**
|
||||
- samples/server/echo_api/kotlin-wiremock/**
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Kotlin WireMock
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/server/petstore/kotlin-wiremock
|
||||
- samples/server/petstore/kotlin-wiremock-responses
|
||||
- samples/server/echo_api/kotlin-wiremock
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 11
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.gradle
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Install Gradle wrapper
|
||||
uses: eskatos/gradle-command-action@v3
|
||||
with:
|
||||
build-root-directory: ${{ matrix.sample }}
|
||||
arguments: wrapper
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: ./gradlew build -x test
|
31
.github/workflows/samples-ocaml.yaml
vendored
31
.github/workflows/samples-ocaml.yaml
vendored
@ -1,31 +0,0 @@
|
||||
name: Samples OCaml
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/client/petstore/ocaml/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/ocaml/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build OCaml
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- 'samples/client/petstore/ocaml/'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set-up OCaml
|
||||
uses: ocaml/setup-ocaml@v3
|
||||
with:
|
||||
ocaml-compiler: 5
|
||||
- name: Install
|
||||
run: opam install . --deps-only --with-test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
- name: Build
|
||||
run: opam exec -- dune build
|
||||
working-directory: ${{ matrix.sample }}
|
43
.github/workflows/samples-php8.yaml
vendored
43
.github/workflows/samples-php8.yaml
vendored
@ -1,43 +0,0 @@
|
||||
name: Samples PHP 8.x
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
|
||||
- samples/server/petstore/php-flight/**
|
||||
- samples/server/petstore/php-laravel/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
|
||||
- samples/server/petstore/php-flight/**
|
||||
- samples/server/petstore/php-laravel/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build PHP projects
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php:
|
||||
- "8.1"
|
||||
- "8.2"
|
||||
- "8.3"
|
||||
- "8.4"
|
||||
sample:
|
||||
# servers
|
||||
- samples/server/petstore/php-symfony/SymfonyBundle-php/
|
||||
- samples/server/petstore/php-flight/
|
||||
- samples/server/petstore/php-laravel/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup PHP with tools
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: "${{ matrix.php }}"
|
||||
tools: php-cs-fixer, phpunit
|
||||
- name: composer install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: composer install
|
||||
- name: phpunit
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: vendor/bin/phpunit
|
33
.github/workflows/samples-postman.yaml
vendored
33
.github/workflows/samples-postman.yaml
vendored
@ -1,33 +0,0 @@
|
||||
name: Samples Postman
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/schema/postman-collection/python/**
|
||||
- samples/schema/postman-collection/postman.json
|
||||
- .github/workflows/samples-postman.yaml
|
||||
jobs:
|
||||
build:
|
||||
name: Test Python client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# schema
|
||||
- samples/schema/postman-collection
|
||||
python-version:
|
||||
- "3.12"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
pip install -r python/requirements.txt
|
||||
pip install -r python/test-requirements.txt
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: python -m pytest
|
39
.github/workflows/samples-protobuf.yaml
vendored
39
.github/workflows/samples-protobuf.yaml
vendored
@ -1,39 +0,0 @@
|
||||
name: Samples Protobuf
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- .github/workflows/samples-protobuf.yaml
|
||||
- samples/config/petstore/protobuf-schema/**
|
||||
- samples/config/petstore/protobuf-schema-config/**
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/samples-protobuf.yaml
|
||||
- samples/config/petstore/protobuf-schema/**
|
||||
- samples/config/petstore/protobuf-schema-config/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Protobuf Client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- 'samples/config/petstore/protobuf-schema/'
|
||||
- 'samples/config/petstore/protobuf-schema-config/'
|
||||
- 'samples/config/petstore/protobuf-schema-config-complex/'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Protocol Buffers Compiler
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y protobuf-compiler
|
||||
- name: Generate Protobuf Schema
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
mkdir out
|
||||
protoc --proto_path=. --cpp_out=out models/*.proto services/*.proto
|
||||
- name: Verify Generated Files
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
ls -l out/models
|
||||
ls -l out/services
|
@ -1,49 +0,0 @@
|
||||
name: Python Client (Echo API)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/python/**
|
||||
- samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/**
|
||||
- .github/workflows/samples-python-client-echo-api.yaml
|
||||
jobs:
|
||||
build:
|
||||
name: Test Python client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/python
|
||||
- samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent
|
||||
python-version:
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
- "3.12"
|
||||
- "3.13"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- name: Install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
pip install -r test-requirements.txt
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: python -m unittest discover
|
||||
|
||||
- name: mypy
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: python -m mypy
|
@ -1,33 +0,0 @@
|
||||
name: Python FastAPI Server
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/petstore/python-fastapi/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/python-fastapi/**
|
||||
jobs:
|
||||
build:
|
||||
name: Test Python FastAPI server
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# servers
|
||||
- samples/server/petstore/python-fastapi/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
- name: Install dependencies
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install pytest
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: PYTHONPATH=src pytest
|
63
.github/workflows/samples-python-petstore.yaml
vendored
63
.github/workflows/samples-python-petstore.yaml
vendored
@ -1,63 +0,0 @@
|
||||
name: "Python Client: Petstore"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/openapi3/client/petstore/python-aiohttp/**
|
||||
- samples/openapi3/client/petstore/python/**
|
||||
- .github/workflows/samples-python-petstore.yaml
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test Python client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
- "3.12"
|
||||
- "3.13"
|
||||
sample:
|
||||
- samples/openapi3/client/petstore/python-aiohttp
|
||||
- samples/openapi3/client/petstore/python
|
||||
services:
|
||||
petstore-api:
|
||||
image: swaggerapi/petstore
|
||||
ports:
|
||||
- 80:8080
|
||||
env:
|
||||
SWAGGER_HOST: http://petstore.swagger.io
|
||||
SWAGGER_BASE_PATH: /v2
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
id: py
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
key: ${{ runner.os }}-python-${{ steps.py.outputs.python-version }}-
|
||||
path: |
|
||||
~/.cache/pypoetry/virtualenvs/
|
||||
~/.local/pipx/venvs/poetry/
|
||||
.mypy_cache/
|
||||
|
||||
- name: Install poetry
|
||||
run: pipx install --python '${{ steps.py.outputs.python-path }}' poetry
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: poetry install
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: poetry run pytest -v
|
||||
|
||||
- name: mypy
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: poetry run mypy
|
@ -1,44 +0,0 @@
|
||||
name: Python Client pydantic v1 (Echo API)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/python-pydantic-v1/**
|
||||
- .github/workflows/samples-python-pydantic-v1-client-echo-api.yaml
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test Python client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/python-pydantic-v1/
|
||||
python-version:
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
- "3.12"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- name: Install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
pip install -r test-requirements.txt
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: python -m pytest
|
@ -1,59 +0,0 @@
|
||||
name: "Python Client pydantic v1: Petstore"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/**
|
||||
- samples/openapi3/client/petstore/python-pydantic-v1/**
|
||||
- .github/workflows/samples-python-pydantic-v1-petstore.yaml
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test Python client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
- "3.12"
|
||||
sample:
|
||||
- samples/openapi3/client/petstore/python-pydantic-v1-aiohttp
|
||||
- samples/openapi3/client/petstore/python-pydantic-v1
|
||||
services:
|
||||
petstore-api:
|
||||
image: swaggerapi/petstore
|
||||
ports:
|
||||
- 80:8080
|
||||
env:
|
||||
SWAGGER_HOST: http://petstore.swagger.io
|
||||
SWAGGER_BASE_PATH: /v2
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
id: py
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
key: ${{ runner.os }}-python-${{ steps.py.outputs.python-version }}-
|
||||
path: |
|
||||
~/.cache/pypoetry/virtualenvs/
|
||||
~/.local/pipx/venvs/poetry/
|
||||
.mypy_cache/
|
||||
|
||||
- name: Install poetry
|
||||
run: pipx install --python '${{ steps.py.outputs.python-path }}' poetry
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: poetry install
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: poetry run pytest -v
|
27
.github/workflows/samples-python-server.yaml
vendored
27
.github/workflows/samples-python-server.yaml
vendored
@ -1,27 +0,0 @@
|
||||
name: Python Server
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/petstore/python-aiohttp-srclayout/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/python-aiohttp-srclayout/**
|
||||
jobs:
|
||||
build:
|
||||
name: Test Python server
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# servers
|
||||
- samples/server/petstore/python-aiohttp-srclayout/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: make test-all
|
42
.github/workflows/samples-r.yaml
vendored
42
.github/workflows/samples-r.yaml
vendored
@ -1,42 +0,0 @@
|
||||
name: Samples R
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/client/echo_api/r/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/echo_api/r/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build R
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- 'samples/client/echo_api/r/'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- uses: r-lib/actions/setup-r@v2
|
||||
with:
|
||||
r-version: 3.6.1
|
||||
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||
working-directory: ${{ matrix.sample }}
|
||||
with:
|
||||
cache-version: 2
|
||||
- name: Install curl
|
||||
run: sudo apt-get install -y r-cran-curl
|
||||
- name: build and test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
# export _R_CHECK_FORCE_SUGGESTS_=false
|
||||
/bin/bash build_and_test.bash
|
||||
shell: bash
|
43
.github/workflows/samples-ruby.yaml
vendored
43
.github/workflows/samples-ruby.yaml
vendored
@ -1,43 +0,0 @@
|
||||
name: Samples Ruby
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/client/echo_api/ruby-httpx/**'
|
||||
- 'samples/client/echo_api/ruby-faraday/**'
|
||||
- 'samples/client/echo_api/ruby-typhoeus/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/echo_api/ruby-httpx/**'
|
||||
- 'samples/client/echo_api/ruby-faraday/**'
|
||||
- 'samples/client/echo_api/ruby-typhoeus/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Ruby
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- 'samples/client/echo_api/ruby-httpx/'
|
||||
- 'samples/client/echo_api/ruby-faraday/'
|
||||
- 'samples/client/echo_api/ruby-typhoeus/'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && npm install && npm start &)
|
||||
- uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.0
|
||||
bundler-cache: true
|
||||
- name: Install bundle
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: bundle install
|
||||
- name: Run rspec
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: rspec
|
37
.github/workflows/samples-rust.yaml
vendored
37
.github/workflows/samples-rust.yaml
vendored
@ -1,37 +0,0 @@
|
||||
name: Samples Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "samples/client/others/rust/**"
|
||||
- "samples/server/petstore/rust-server/**"
|
||||
- "samples/client/petstore/rust-server/**"
|
||||
- "samples/server/petstore/rust-axum/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- "samples/client/others/rust/**"
|
||||
- "samples/client/petstore/rust/**"
|
||||
- "samples/server/petstore/rust-server/**"
|
||||
- "samples/server/petstore/rust-axum/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Rust
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# these folders contain sub-projects of rust clients, servers
|
||||
- samples/client/others/rust/
|
||||
- samples/client/petstore/rust/
|
||||
- samples/server/petstore/rust-server/
|
||||
- samples/server/petstore/rust-axum/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: cargo build --all-targets --all-features
|
38
.github/workflows/samples-scala-jdk8.yaml
vendored
38
.github/workflows/samples-scala-jdk8.yaml
vendored
@ -1,38 +0,0 @@
|
||||
name: Samples Scala/sbt (JDK8)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/server/petstore/scala-finch/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/server/petstore/scala-finch/**'
|
||||
jobs:
|
||||
build:
|
||||
name: Build scala-finch servers
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# servers
|
||||
- samples/server/petstore/scala-finch # cannot be tested with jdk11
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 8
|
||||
- name: Setup sbt launcher
|
||||
uses: sbt/setup-sbt@v1
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.ivy2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
|
||||
- name: Build and test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: sbt -v +test
|
55
.github/workflows/samples-scala.yaml
vendored
55
.github/workflows/samples-scala.yaml
vendored
@ -1,55 +0,0 @@
|
||||
name: Samples Scala/sbt
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/client/petstore/scala**'
|
||||
- 'samples/server/petstore/scala**'
|
||||
- 'samples/client/petstore/java/okhttp-gson/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/scala**'
|
||||
- 'samples/server/petstore/scala**'
|
||||
- 'samples/client/petstore/java/okhttp-gson/**'
|
||||
jobs:
|
||||
build:
|
||||
name: Build sbt/Scala client, servers
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/petstore/java/okhttp-gson
|
||||
- samples/client/petstore/scalaz
|
||||
- samples/client/petstore/scala-pekko
|
||||
- samples/client/petstore/scala-http4s
|
||||
#- samples/client/petstore/scala-sttp
|
||||
#- samples/client/petstore/scala-sttp-circe
|
||||
# servers
|
||||
- samples/server/petstore/scala-lagom-server
|
||||
- samples/server/petstore/scala-play-server
|
||||
- samples/server/petstore/scala-akka-http-server
|
||||
- samples/server/petstore/scala-pekko-http-server
|
||||
- samples/server/petstore/scalatra
|
||||
- samples/server/petstore/scala-http4s-server
|
||||
- samples/server/petstore/scala-cask
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 11
|
||||
- name: Setup sbt launcher
|
||||
uses: sbt/setup-sbt@v1
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.ivy2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
|
||||
- name: Build and test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: sbt -v +test
|
55
.github/workflows/samples-spring-jdk17.yaml
vendored
55
.github/workflows/samples-spring-jdk17.yaml
vendored
@ -1,55 +0,0 @@
|
||||
name: Samples Java Spring (JDK17)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
|
||||
- samples/openapi3/server/petstore/springboot-3
|
||||
- samples/server/petstore/springboot-api-response-examples
|
||||
- samples/server/petstore/springboot-lombok-data
|
||||
- samples/server/petstore/springboot-lombok-tostring
|
||||
- samples/server/petstore/springboot-file-delegate-optional
|
||||
- samples/server/petstore/springboot-petstore-with-api-response-examples
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
|
||||
- samples/openapi3/server/petstore/springboot-3
|
||||
- samples/server/petstore/springboot-api-response-examples
|
||||
- samples/server/petstore/springboot-lombok-data
|
||||
- samples/server/petstore/springboot-lombok-tostring
|
||||
- samples/server/petstore/springboot-file-delegate-optional
|
||||
- samples/server/petstore/springboot-petstore-with-api-response-examples
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Spring (JDK17)
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
|
||||
# servers
|
||||
- samples/openapi3/server/petstore/springboot-3
|
||||
- samples/server/petstore/springboot-api-response-examples
|
||||
- samples/server/petstore/springboot-lombok-data
|
||||
- samples/server/petstore/springboot-lombok-tostring
|
||||
- samples/server/petstore/springboot-file-delegate-optional
|
||||
- samples/server/petstore/springboot-petstore-with-api-response-examples
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
79
.github/workflows/samples-spring.yaml
vendored
79
.github/workflows/samples-spring.yaml
vendored
@ -1,79 +0,0 @@
|
||||
name: Samples Java Spring
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
# clients
|
||||
- 'samples/client/petstore/spring*/**'
|
||||
# servers
|
||||
- 'samples/server/petstore/spring*/**'
|
||||
- 'samples/openapi3/server/petstore/spring*/**'
|
||||
pull_request:
|
||||
paths:
|
||||
# clients
|
||||
- 'samples/client/petstore/spring*/**'
|
||||
# servers
|
||||
- 'samples/server/petstore/spring*/**'
|
||||
- 'samples/openapi3/server/petstore/spring*/**'
|
||||
jobs:
|
||||
build:
|
||||
name: Build Java Spring
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/petstore/spring-cloud
|
||||
- samples/client/petstore/spring-cloud-auth
|
||||
- samples/client/petstore/spring-cloud-date-time
|
||||
- samples/client/petstore/spring-cloud-deprecated
|
||||
- samples/client/petstore/spring-cloud-tags
|
||||
- samples/openapi3/client/petstore/spring-cloud
|
||||
- samples/openapi3/client/petstore/spring-cloud-async
|
||||
- samples/openapi3/client/petstore/spring-cloud-date-time
|
||||
- samples/openapi3/client/petstore/spring-cloud-http-basic
|
||||
- samples/openapi3/client/petstore/spring-cloud-spring-pageable
|
||||
- samples/openapi3/client/petstore/spring-stubs
|
||||
- samples/openapi3/client/petstore/spring-stubs-skip-default-interface
|
||||
# servers
|
||||
- samples/openapi3/server/petstore/springboot
|
||||
- samples/openapi3/server/petstore/springboot-implicitHeaders
|
||||
- samples/openapi3/server/petstore/springboot-delegate
|
||||
- samples/openapi3/server/petstore/spring-boot-oneof
|
||||
- samples/server/petstore/spring-boot-nullable-set
|
||||
- samples/server/petstore/spring-boot-defaultInterface-unhandledException
|
||||
- samples/server/petstore/springboot
|
||||
- samples/server/petstore/springboot-beanvalidation
|
||||
- samples/server/petstore/springboot-builtin-validation
|
||||
- samples/server/petstore/springboot-delegate
|
||||
- samples/server/petstore/springboot-delegate-no-response-entity
|
||||
- samples/server/petstore/springboot-implicitHeaders
|
||||
- samples/server/petstore/springboot-implicitHeaders-annotationLibrary
|
||||
- samples/server/petstore/springboot-lombok-data
|
||||
- samples/server/petstore/springboot-reactive
|
||||
- samples/server/petstore/springboot-reactive-noResponseEntity
|
||||
- samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8
|
||||
- samples/server/petstore/springboot-spring-pageable-delegatePattern
|
||||
- samples/server/petstore/springboot-spring-pageable-without-j8
|
||||
- samples/server/petstore/springboot-spring-pageable
|
||||
- samples/server/petstore/springboot-spring-provide-args
|
||||
- samples/server/petstore/springboot-useoptional
|
||||
- samples/server/petstore/springboot-virtualan
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 8
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2
|
||||
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: mvn clean package --no-transfer-progress
|
44
.github/workflows/samples-swift5.yaml
vendored
44
.github/workflows/samples-swift5.yaml
vendored
@ -1,44 +0,0 @@
|
||||
name: Samples Swift 5
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/petstore/swift5/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/petstore/swift5/**
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest]
|
||||
sample:
|
||||
- samples/client/petstore/swift5/alamofireLibrary
|
||||
- samples/client/petstore/swift5/asyncAwaitLibrary
|
||||
- samples/client/petstore/swift5/combineLibrary
|
||||
- samples/client/petstore/swift5/default
|
||||
- samples/client/petstore/swift5/objcCompatible
|
||||
- samples/client/petstore/swift5/oneOf
|
||||
- samples/client/petstore/swift5/promisekitLibrary
|
||||
- samples/client/petstore/swift5/resultLibrary
|
||||
- samples/client/petstore/swift5/rxswiftLibrary
|
||||
- samples/client/petstore/swift5/urlsessionLibrary
|
||||
- samples/client/petstore/swift5/validation
|
||||
# NOTE: disabled as vaporLibrary doesnt build when adding this CI config
|
||||
#- samples/client/petstore/swift5/vaporLibrary
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
sample: samples/client/petstore/swift5/alamofireLibrary
|
||||
name: Build Swift samples
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: swift-actions/setup-swift@v2
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
with:
|
||||
swift-version: '5'
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: swift build
|
@ -1,42 +0,0 @@
|
||||
name: TypeScript Axios Client (Echo API)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/typescript-axios/**
|
||||
- .github/workflows/samples-typescript-axios-echo-api.yaml
|
||||
jobs:
|
||||
build:
|
||||
name: Test TypeScript Axios client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/typescript-axios/test
|
||||
node-version:
|
||||
- 16
|
||||
- 18
|
||||
- 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
||||
(cd http-echo-server && git checkout 15a684c41d4de692878636f47fcc1670af309a0f && npm install && npm start &)
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
npm run preinstall
|
||||
npm i
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: npm test
|
@ -1,37 +0,0 @@
|
||||
name: TypeScript Client (Encoding / Decoding Test)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/others/typescript/encode-decode/**
|
||||
- .github/workflows/samples-typescript-encode-decode.yaml
|
||||
jobs:
|
||||
build:
|
||||
name: Test TypeScript Encoding / Decoding
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/others/typescript/encode-decode/test
|
||||
node-version:
|
||||
- 16
|
||||
- 18
|
||||
- 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
npm run preinstall
|
||||
npm i
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: npm test
|
@ -1,37 +0,0 @@
|
||||
name: TypeScript Node Client (Encoding / Decoding Test)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/others/typescript-node/encode-decode/**
|
||||
- .github/workflows/samples-typescript-node-encode-decode.yaml
|
||||
jobs:
|
||||
build:
|
||||
name: Test TypeScript Node Encoding / Decoding
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/others/typescript-node/encode-decode/test
|
||||
node-version:
|
||||
- 16
|
||||
- 18
|
||||
- 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
npm run preinstall
|
||||
npm i
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: npm test
|
@ -1,26 +0,0 @@
|
||||
name: TypeScript clients type checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/**
|
||||
- bin/ts-typecheck-all.sh
|
||||
- .github/workflows/samples-typescript-typecheck.yaml
|
||||
jobs:
|
||||
build:
|
||||
name: Typecheck TypeScript samples
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version:
|
||||
- 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Run type checker
|
||||
run: ./bin/ts-typecheck-all.sh
|
30
.github/workflows/samples-zapier.yaml
vendored
30
.github/workflows/samples-zapier.yaml
vendored
@ -1,30 +0,0 @@
|
||||
name: Samples Zapier
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'samples/client/petstore/zapier/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/zapier/**'
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: Test zapier generation
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/zapier
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
- name: Install dependencies
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
npm install
|
||||
- name: Validate
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: node index.js
|
59
.github/workflows/windows.yaml
vendored
59
.github/workflows/windows.yaml
vendored
@ -1,59 +0,0 @@
|
||||
name: Windows tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [11, 17]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK ${{ matrix.java }}
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
distribution: 'temurin'
|
||||
- name: Cache maven dependencies
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-maven-repository
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
~/.gradle
|
||||
!~/.gradle/caches/*/plugin-resolution/
|
||||
!~/.m2/repository/org/openapitools/
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
- name: Setup Maven
|
||||
uses: s4u/setup-maven-action@v1.18.0
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
maven-version: 3.8.8
|
||||
- name: Run maven
|
||||
run: ./mvnw clean --no-snapshot-updates --batch-mode --quiet install
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
||||
- name: Test Template Retrieval
|
||||
run: |
|
||||
cd modules/openapi-generator-cli/target
|
||||
# generator names containing "-" caused problems in the past, see https://github.com/OpenAPITools/openapi-generator/issues/9528
|
||||
java -jar ./openapi-generator-cli.jar author template --verbose -g jaxrs-spec --library quarkus
|
||||
- name: Setup Gradle
|
||||
uses: gradle/gradle-build-action@v3
|
||||
- name: Gradle tests
|
||||
run: |
|
||||
gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace
|
163
.gitignore
vendored
163
.gitignore
vendored
@ -1,6 +1,3 @@
|
||||
.mvn/.gradle-enterprise/
|
||||
.mvn/.develocity/
|
||||
.scannerwork/
|
||||
.vscode
|
||||
*.iml
|
||||
out/
|
||||
@ -9,8 +6,6 @@ out/
|
||||
*.gpg
|
||||
classpath.txt
|
||||
version.properties
|
||||
modules/openapi-generator-maven-plugin/src/test/resources/default/_merged_spec.yaml
|
||||
modules/openapi-generator-gradle-plugin/bin/
|
||||
!modules/openapi-generator-cli/src/main/resources/version.properties
|
||||
.project
|
||||
.classpath
|
||||
@ -31,14 +26,6 @@ packages/
|
||||
.packages
|
||||
.vagrant/
|
||||
.vscode/
|
||||
**/.vs
|
||||
.factorypath
|
||||
.metals/*
|
||||
nbproject/
|
||||
nbactions.xml
|
||||
nb-configuration.xml
|
||||
.direnv/
|
||||
**/:w
|
||||
|
||||
.settings
|
||||
|
||||
@ -50,13 +37,7 @@ nb-configuration.xml
|
||||
|
||||
/target
|
||||
/generated-files
|
||||
test-output/
|
||||
nbactions.xml
|
||||
test-output/
|
||||
|
||||
# website
|
||||
website/build/
|
||||
website/package-lock.json
|
||||
|
||||
# scalatra
|
||||
samples/server-generator/scalatra/output
|
||||
@ -69,34 +50,20 @@ samples/server-generator/node/output/node_modules
|
||||
samples/server/petstore/nodejs/node_modules
|
||||
samples/server/petstore/nodejs-server/node_modules
|
||||
|
||||
# qt cpp
|
||||
samples/client/build
|
||||
samples/client/petstore/build
|
||||
samples/client/petstore/cpp-qt/PetStore/moc_*
|
||||
samples/client/petstore/cpp-qt/PetStore/*.o
|
||||
samples/client/petstore/cpp-qt/build-*
|
||||
samples/client/petstore/cpp-qt/build-*
|
||||
samples/client/petstore/cpp-qt/PetStore/PetStore
|
||||
samples/client/petstore/cpp-qt/PetStore/Makefile
|
||||
samples/client/petstore/cpp-qt/PetStore/PetStore.pro.user
|
||||
samples/client/petstore/cpp-qt/CMakeLists.txt.user
|
||||
|
||||
# cpprestsdk
|
||||
samples/client/petstore/cpp-restsdk/CMakeCache.txt
|
||||
samples/client/petstore/cpp-restsdk/CMakeFiles/
|
||||
samples/client/petstore/cpp-restsdk/Makefile
|
||||
samples/client/petstore/cpp-restsdk/cmake_install.cmake
|
||||
samples/client/petstore/cpp-restsdk/client/CMakeFiles
|
||||
samples/client/petstore/cpp-restsdk/client/Makefile
|
||||
samples/client/petstore/cpp-restsdk/client/cmake_install.cmake
|
||||
samples/client/petstore/cpp-restsdk/client/CppRestPetstoreClientConfig.cmake
|
||||
samples/client/petstore/cpp-restsdk/client/CMakeCache.txt
|
||||
# qt5 cpp
|
||||
*.pro.user
|
||||
samples/client/petstore/qt5cpp/PetStore/moc_*
|
||||
samples/client/petstore/qt5cpp/PetStore/*.o
|
||||
samples/client/petstore/qt5cpp/build-*
|
||||
samples/client/petstore/qt5cpp/PetStore/PetStore
|
||||
samples/client/petstore/qt5cpp/PetStore/Makefile
|
||||
samples/client/petstore/qt5cpp/PetStore/PetStore.pro.user
|
||||
|
||||
#Java/Android
|
||||
**/.gradle
|
||||
samples/client/petstore/java/hello.txt
|
||||
samples/client/petstore/java/okhttp-gson/hello.txt
|
||||
samples/client/petstore/java/okhttp-gson-3.1/hello.txt
|
||||
samples/client/petstore/java/jersey1/hello.txt
|
||||
samples/client/petstore/java/jersey2-java8/hello.txt
|
||||
samples/client/petstore/java/jersey2/hello.txt
|
||||
samples/client/petstore/android/default/hello.txt
|
||||
@ -107,9 +74,6 @@ samples/client/petstore/java/jersey2/build/
|
||||
samples/client/petstore/java/okhttp-gson/.gradle/
|
||||
samples/client/petstore/java/okhttp-gson/build/
|
||||
samples/client/petstore/java/feign/build/
|
||||
samples/client/petstore/java/feign10x/build/
|
||||
samples/client/petstore/java/feign/project/
|
||||
samples/client/petstore/java/feign10x/project/
|
||||
samples/client/petstore/java/retrofit/build/
|
||||
samples/client/petstore/java/retrofit2/build/
|
||||
samples/client/petstore/java/retrofit2/hello.txt
|
||||
@ -119,9 +83,19 @@ samples/client/petstore/scala/build/
|
||||
samples/client/petstore/java/resttemplate/hello.txt
|
||||
samples/client/petstore/java/retrofit2/hello.txt
|
||||
samples/client/petstore/java/feign/hello.txt
|
||||
samples/client/petstore/java/jersey2-java6/project/
|
||||
samples/client/petstore/java/jersey2-java8/project/
|
||||
samples/client/petstore/java/jersey2/project/
|
||||
|
||||
#PHP
|
||||
samples/client/petstore/php/OpenAPIToolsClient-php/composer.lock
|
||||
samples/client/petstore/php/OpenAPIToolsClient-php/vendor/
|
||||
samples/client/petstore/silex/SwaggerServer/composer.lock
|
||||
samples/client/petstore/silex/SwaggerServer/venodr/
|
||||
**/vendor/
|
||||
**/composer.lock
|
||||
|
||||
#PHP-Symfony
|
||||
samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/cache/
|
||||
samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/logs/
|
||||
|
||||
|
||||
# Perl
|
||||
samples/client/petstore/perl/deep_module_test/
|
||||
@ -145,18 +119,19 @@ samples/client/petstore/swift/**/SwaggerClientTests/SwaggerClient.xcworkspace/xc
|
||||
samples/client/petstore/swift/**/SwaggerClientTests/Pods/
|
||||
#samples/client/petstore/swift/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcuserdata
|
||||
#samples/client/petstore/swift/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddata/xcschemes
|
||||
samples/client/petstore/swift/**/SwaggerClientTests/Podfile.lock
|
||||
samples/client/petstore/swift/**/SwaggerClientTests/Podfile.lock
|
||||
# Swift3
|
||||
samples/client/petstore/swift3/**/SwaggerClientTests/SwaggerClient.xcodeproj/xcuserdata
|
||||
samples/client/petstore/swift3/**/SwaggerClientTests/SwaggerClient.xcworkspace/xcuserdata
|
||||
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/
|
||||
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcuserdata
|
||||
#samples/client/petstore/swift3/**/SwaggerClientTests/Pods/Pods.xcodeproj/xcshareddata/xcschemes
|
||||
samples/client/petstore/swift3/**/SwaggerClientTests/Podfile.lock
|
||||
samples/client/petstore/swift3/**/SwaggerClientTests/Podfile.lock
|
||||
|
||||
# C#
|
||||
*.csproj.user
|
||||
samples/client/petstore/csharp/SwaggerClient/IO.Swagger.userprefs
|
||||
samples/client/petstore/csharp/SwaggerClientTest/.vs
|
||||
samples/client/petstore/csharp/SwaggerClientTest/obj
|
||||
samples/client/petstore/csharp/SwaggerClientTest/bin
|
||||
samples/client/petstore/csharp/SwaggerClientTest/packages
|
||||
@ -174,73 +149,44 @@ samples/client/petstore/csharp/SwaggerClient/bin/Debug/
|
||||
samples/client/petstore/csharp/SwaggerClient/packages
|
||||
samples/client/petstore/csharp/SwaggerClient/TestResult.xml
|
||||
samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/IO.Swagger.userprefs
|
||||
samples/client/petstore/csharp-refactor/OpenAPIClient/TestResult.xml
|
||||
samples/client/petstore/csharp-refactor/OpenAPIClient/nuget.exe
|
||||
|
||||
# Python
|
||||
*.pyc
|
||||
__pycache__
|
||||
.venv/
|
||||
samples/client/petstore/python/dev-requirements.txt.log
|
||||
samples/client/petstore/python/swagger_client.egg-info/SOURCES.txt
|
||||
samples/client/petstore/python/.coverage
|
||||
samples/client/petstore/python/.projectile
|
||||
samples/client/petstore/python-asyncio/.pytest_cache/
|
||||
**/poetry.lock
|
||||
|
||||
# PHP
|
||||
samples/client/petstore/php/OpenAPIClient-php/composer.lock
|
||||
samples/client/petstore/php-nextgen/OpenAPIClient-php/composer.lock
|
||||
samples/client/petstore/php-dt/composer.lock
|
||||
samples/client/petstore/php-dt-modern/composer.lock
|
||||
samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
|
||||
samples/server/petstore/php-laravel/lib/composer.lock
|
||||
samples/server/petstore/php-lumen/lib/composer.lock
|
||||
samples/server/petstore/php-slim4/composer.lock
|
||||
samples/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
|
||||
samples/server/petstore/php-mezzio-ph/composer.lock
|
||||
samples/server/petstore/php-mezzio-ph-modern/composer.lock
|
||||
samples/client/petstore/python/.venv/
|
||||
|
||||
# ts
|
||||
samples/client/petstore/typescript-node/npm/node_modules
|
||||
samples/client/petstore/typescript-node/**/typings
|
||||
samples/client/petstore/typescript-angular/**/typings
|
||||
samples/client/petstore/typescript-fetch/**/dist/
|
||||
samples/client/petstore/typescript-fetch/**/typings
|
||||
samples/client/petstore/typescript-angular2/npm/npm-debug.log
|
||||
samples/client/petstore/typescript-node/npm/npm-debug.log
|
||||
samples/client/petstore/typescript-aurelia/**/dist/
|
||||
samples/client/petstore/typescript-angular/tsd-debug.log
|
||||
samples/client/petstore/typescript-axios/tests/**/dist/
|
||||
samples/client/petstore/typescript-fetch/tests/**/dist/
|
||||
|
||||
# aspnetcore
|
||||
samples/server/petstore/aspnetcore/.vs/
|
||||
effective.pom
|
||||
|
||||
# kotlin
|
||||
samples/openapi3/client/petstore/kotlin/build
|
||||
samples/client/petstore/kotlin/src/main/kotlin/test/
|
||||
samples/client/petstore/kotlin-threetenbp/build
|
||||
samples/client/petstore/kotlin-string/build
|
||||
samples/server/petstore/kotlin-server/ktor/build
|
||||
samples/server/petstore/kotlin-springboot/build
|
||||
samples/client/petstore/kotlin*/src/main/kotlin/test/
|
||||
samples/client/petstore/kotlin*/build/
|
||||
samples/server/others/kotlin-server/jaxrs-spec/build/
|
||||
samples/client/echo_api/kotlin-jvm-spring-3-restclient/build/
|
||||
samples/client/echo_api/kotlin-jvm-okhttp/build/
|
||||
\?
|
||||
|
||||
# haskell
|
||||
.stack-work
|
||||
.cabal-sandbox
|
||||
cabal.project.local
|
||||
samples/client/petstore/haskell-http-client/docs/haddock-bundle.min.js
|
||||
samples/client/petstore/haskell-http-client/docs/meta.json
|
||||
samples/client/petstore/haskell-http-client/docs/quick-jump.css
|
||||
samples/client/petstore/haskell-http-client/stack.yaml.lock
|
||||
samples/server/petstore/haskell-servant/stack.yaml.lock
|
||||
samples/server/petstore/haskell-yesod/stack.yaml.lock
|
||||
|
||||
# R
|
||||
.Rproj.user
|
||||
samples/client/petstore/R/**/petstore.Rcheck/
|
||||
samples/client/petstore/R/**/*.tar.gz
|
||||
samples/client/petstore/R/R.Rproj
|
||||
samples/client/petstore/R/man/
|
||||
samples/client/petstore/R-httr2-wrapper/man/
|
||||
samples/client/petstore/R-httr2/man/
|
||||
|
||||
# elixir
|
||||
samples/client/petstore/elixir/_build/
|
||||
@ -253,43 +199,16 @@ samples/client/petstore/groovy/build
|
||||
# erlang
|
||||
samples/client/petstore/erlang-client/_build/
|
||||
samples/client/petstore/erlang-client/rebar.lock
|
||||
samples/client/petstore/erlang-proper/_build/
|
||||
samples/client/petstore/erlang-proper/rebar.lock
|
||||
samples/server/petstore/erlang-server/_build/
|
||||
samples/server/petstore/erlang-server/rebar.lock
|
||||
|
||||
# Dart
|
||||
**/dart*/**/.dart_tool
|
||||
**/dart*/**/.packages
|
||||
**/dart*/**/pubspec.lock
|
||||
# Dart dio
|
||||
**/dart*/**/*.g.dart
|
||||
# dart
|
||||
samples/client/petstore/dart/petstore/packages
|
||||
samples/client/petstore/dart/flutter_petstore/test/packages
|
||||
samples/client/petstore/dart/petstore/test/packages
|
||||
|
||||
# JS
|
||||
samples/client/petstore/javascript-es6/package-lock.json
|
||||
samples/client/petstore/javascript-promise-es6/package-lock.json
|
||||
samples/client/petstore/javascript-apollo/package-lock.json
|
||||
samples/client/petstore/javascript/package-lock.json
|
||||
|
||||
# elm
|
||||
samples/client/petstore/elm/index.html
|
||||
|
||||
# C
|
||||
samples/client/petstore/c/build
|
||||
samples/client/petstore/c/*.so
|
||||
|
||||
# Ruby
|
||||
samples/openapi3/client/petstore/ruby/Gemfile.lock
|
||||
samples/openapi3/client/petstore/ruby-faraday/Gemfile.lock
|
||||
samples/openapi3/client/petstore/ruby-httpx/Gemfile.lock
|
||||
|
||||
# Crystal
|
||||
samples/client/petstore/crystal/lib
|
||||
|
||||
# Go
|
||||
samples/openapi3/client/petstore/go/privatekey.pem
|
||||
|
||||
## OCaml
|
||||
samples/client/petstore/ocaml/_build/
|
||||
|
||||
# jetbrain http client
|
||||
samples/client/jetbrains/adyen/checkout71/http/client/Apis/http-client.private.env.json
|
||||
|
137
.gitpod.yml
137
.gitpod.yml
@ -1,137 +0,0 @@
|
||||
## Learn more about this file at 'https://www.gitpod.io/docs/references/gitpod-yml'
|
||||
##
|
||||
## This '.gitpod.yml' file when placed at the root of a project instructs
|
||||
## Gitpod how to prepare & build the project, start development environments
|
||||
## and configure continuous prebuilds. Prebuilds when enabled builds a project
|
||||
## like a CI server so you can start coding right away - no more waiting for
|
||||
## dependencies to download and builds to finish when reviewing pull-requests
|
||||
## or hacking on something new.
|
||||
##
|
||||
## With Gitpod you can develop software from any device (even iPads) via
|
||||
## desktop or browser based versions of VS Code or any JetBrains IDE and
|
||||
## customise it to your individual needs - from themes to extensions, you
|
||||
## have full control.
|
||||
##
|
||||
## The easiest way to try out Gitpod is install the browser extension:
|
||||
## 'https://www.gitpod.io/docs/browser-extension' or by prefixing
|
||||
## 'https://gitpod.io#' to the source control URL of any project.
|
||||
##
|
||||
## For example: 'https://gitpod.io#https://github.com/gitpod-io/gitpod'
|
||||
|
||||
|
||||
## The 'image' section defines which Docker image Gitpod should use.
|
||||
## By default, Gitpod uses a standard Docker Image called 'workspace-full'
|
||||
## which can be found at 'https://github.com/gitpod-io/workspace-images'
|
||||
##
|
||||
## Workspaces started based on this default image come pre-installed with
|
||||
## Docker, Go, Java, Node.js, C/C++, Python, Ruby, Rust, PHP as well as
|
||||
## tools such as Homebrew, Tailscale, Nginx and several more.
|
||||
##
|
||||
## If this image does not include the tools needed for your project then
|
||||
## a public Docker image or your own Docker file can be configured.
|
||||
##
|
||||
## Learn more about images at 'https://www.gitpod.io/docs/config-docker'
|
||||
|
||||
#image: node:buster # use 'https://hub.docker.com/_/node'
|
||||
#
|
||||
#image: # leave image undefined if using a Dockerfile
|
||||
# file: .gitpod.Dockerfile # relative path to the Dockerfile from the
|
||||
# # root of the project
|
||||
|
||||
## The 'tasks' section defines how Gitpod prepares and builds this project
|
||||
## or how Gitpod can start development servers. With Gitpod, there are three
|
||||
## types of tasks:
|
||||
##
|
||||
## - before: Use this for tasks that need to run before init and before command.
|
||||
## - init: Use this to configure prebuilds of heavy-lifting tasks such as
|
||||
## downloading dependencies or compiling source code.
|
||||
## - command: Use this to start your database or application when the workspace starts.
|
||||
##
|
||||
## Learn more about these tasks at 'https://www.gitpod.io/docs/config-start-tasks'
|
||||
|
||||
#tasks:
|
||||
# - before: |
|
||||
# # commands to execute...
|
||||
#
|
||||
# - init: |
|
||||
# # sudo apt-get install python3 # can be used to install operating system
|
||||
# # dependencies but these are not kept after the
|
||||
# # prebuild completes thus Gitpod recommends moving
|
||||
# # operating system dependency installation steps
|
||||
# # to a custom Dockerfile to make prebuilds faster
|
||||
# # and to keep your codebase DRY.
|
||||
# # 'https://www.gitpod.io/docs/config-docker'
|
||||
#
|
||||
# # pip install -r requirements.txt # install codebase dependencies
|
||||
# # cmake # precompile codebase
|
||||
#
|
||||
# - name: Web Server
|
||||
# openMode: split-left
|
||||
# env:
|
||||
# WEBSERVER_PORT: 8080
|
||||
# command: |
|
||||
# python3 -m http.server $WEBSERVER_PORT
|
||||
#
|
||||
# - name: Web Browser
|
||||
# openMode: split-right
|
||||
# env:
|
||||
# WEBSERVER_PORT: 8080
|
||||
# command: |
|
||||
# gp await-port $WEBSERVER_PORT
|
||||
# lynx `gp url`
|
||||
|
||||
tasks:
|
||||
- init: ./mvnw package -DskipTests
|
||||
|
||||
## The 'ports' section defines various ports your may listen on are
|
||||
## configured in Gitpod on an authenticated URL. By default, all ports
|
||||
## are in private visibility state.
|
||||
##
|
||||
## Learn more about ports at 'https://www.gitpod.io/docs/config-ports'
|
||||
|
||||
#ports:
|
||||
# - port: 8080 # alternatively configure entire ranges via '8080-8090'
|
||||
# visibility: private # either 'public' or 'private' (default)
|
||||
# onOpen: open-browser # either 'open-browser', 'open-preview' or 'ignore'
|
||||
|
||||
|
||||
## The 'vscode' section defines a list of Visual Studio Code extensions from
|
||||
## the OpenVSX.org registry to be installed upon workspace startup. OpenVSX
|
||||
## is an open alternative to the proprietary Visual Studio Code Marketplace
|
||||
## and extensions can be added by sending a pull-request with the extension
|
||||
## identifier to https://github.com/open-vsx/publish-extensions
|
||||
##
|
||||
## The identifier of an extension is always ${publisher}.${name}.
|
||||
##
|
||||
## For example: 'vscodevim.vim'
|
||||
##
|
||||
## Learn more at 'https://www.gitpod.io/docs/ides-and-editors/vscode'
|
||||
|
||||
vscode:
|
||||
extensions:
|
||||
- redhat.java
|
||||
- vscjava.vscode-java-pack
|
||||
|
||||
## The 'github' section defines configuration of continuous prebuilds
|
||||
## for GitHub repositories when the GitHub application
|
||||
## 'https://github.com/apps/gitpod-io' is installed in GitHub and granted
|
||||
## permissions to access the repository.
|
||||
##
|
||||
## Learn more at 'https://www.gitpod.io/docs/prebuilds'
|
||||
|
||||
github:
|
||||
prebuilds:
|
||||
# enable for the default branch
|
||||
master: true
|
||||
# enable for all branches in this repo
|
||||
branches: true
|
||||
# enable for pull requests coming from this repo
|
||||
pullRequests: true
|
||||
# enable for pull requests coming from forks
|
||||
pullRequestsFromForks: true
|
||||
# add a check to pull requests
|
||||
addCheck: true
|
||||
# add a "Review in Gitpod" button as a comment to pull requests
|
||||
addComment: true
|
||||
# add a "Review in Gitpod" button to the pull request's description
|
||||
addBadge: false
|
@ -1,32 +0,0 @@
|
||||
## The builder labeled image acts as a transient container which is meant to
|
||||
## hold all non-artifact code.
|
||||
##
|
||||
## You can build _just_ this part with:
|
||||
## docker --target builder -t container-name:builder -f .hub.cli.dockerfile .
|
||||
FROM maven:3-eclipse-temurin-17 as builder
|
||||
|
||||
ENV GEN_DIR /opt/openapi-generator
|
||||
WORKDIR ${GEN_DIR}
|
||||
COPY . ${GEN_DIR}
|
||||
|
||||
# Pre-compile openapi-generator-cli
|
||||
RUN mvn -B -am -pl "modules/openapi-generator-cli" package
|
||||
|
||||
## The final (release) image
|
||||
## The resulting container here only needs the target jar
|
||||
## and ca-certificates (to be able to query HTTPS hosted specs)
|
||||
FROM eclipse-temurin:17-jre
|
||||
|
||||
ENV GEN_DIR /opt/openapi-generator
|
||||
|
||||
RUN mkdir -p ${GEN_DIR}/modules/openapi-generator-cli/target
|
||||
|
||||
WORKDIR ${GEN_DIR}/modules/openapi-generator-cli/target
|
||||
|
||||
COPY --from=builder ${GEN_DIR}/modules/openapi-generator-cli/target/openapi-generator-cli.jar ${GEN_DIR}/modules/openapi-generator-cli/target/openapi-generator-cli.jar
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
||||
CMD ["help"]
|
@ -1,32 +0,0 @@
|
||||
## The builder labeled image acts as a transient container which is meant to
|
||||
## hold all non-artifact code.
|
||||
##
|
||||
## You can build _just_ this part with:
|
||||
## docker --target builder -t container-name:builder -f .hub.online.dockerfile .
|
||||
FROM maven:3-eclipse-temurin-17 as builder
|
||||
|
||||
ENV GEN_DIR /opt/openapi-generator
|
||||
WORKDIR ${GEN_DIR}
|
||||
COPY . ${GEN_DIR}
|
||||
|
||||
# Pre-compile openapi-generator-online
|
||||
RUN mvn -B -am -pl "modules/openapi-generator-online" package
|
||||
|
||||
## The final (release) image
|
||||
## The resulting container here only needs the target jar
|
||||
FROM eclipse-temurin:17-jre
|
||||
|
||||
ENV GEN_DIR /opt/openapi-generator
|
||||
ENV TARGET_DIR /generator
|
||||
|
||||
RUN mkdir -p ${TARGET_DIR}
|
||||
|
||||
WORKDIR ${TARGET_DIR}
|
||||
|
||||
COPY --from=builder ${GEN_DIR}/modules/openapi-generator-online/target/openapi-generator-online.jar ${TARGET_DIR}/openapi-generator-online.jar
|
||||
|
||||
ENV GENERATOR_HOST=""
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["java", "-jar", "/generator/openapi-generator-online.jar"]
|
@ -1 +1 @@
|
||||
11
|
||||
oracle64-1.8.0.152
|
||||
|
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
|
||||
<!-- Common develocity.xml configuration for Maven shared between CI agents and developers building locally.
|
||||
|
||||
The build cache credentials required for CI builds to write to the remote build cache are read from environment variables.
|
||||
Possibly, the credentials are configured in Jenkins via Credentials plugin (https://plugins.jenkins.io/credentials/) and
|
||||
Credentials Binding plugin (https://plugins.jenkins.io/credentials-binding/), or the credentials are injected using the
|
||||
vendor-specific mechanism of the CI server running the build.
|
||||
|
||||
Note: In the XML configuration below, you need to adjust
|
||||
|
||||
- the server url of your Develocity server
|
||||
- the name of the environment variable that reveals the build is running in a CI environment
|
||||
- the names of the environment variables holding the build cache credentials
|
||||
|
||||
to the specifics of your CI server settings. -->
|
||||
|
||||
<develocity
|
||||
xmlns="https://www.gradle.com/develocity-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="https://www.gradle.com/develocity-maven https://www.gradle.com/schema/develocity-maven.xsd">
|
||||
<server>
|
||||
<url>https://ge.openapi-generator.tech/</url>
|
||||
<allowUntrusted>false</allowUntrusted>
|
||||
</server>
|
||||
<buildScan>
|
||||
<backgroundBuildScanUpload>#{isFalse(env['CI'])}</backgroundBuildScanUpload> <!-- adjust to your CI provider -->
|
||||
<publishing>
|
||||
<onlyIf>authenticated</onlyIf>
|
||||
</publishing>
|
||||
<obfuscation>
|
||||
<!-- Use a redacted value.-->
|
||||
<ipAddresses>#{{'0.0.0.0'}}</ipAddresses>
|
||||
</obfuscation>
|
||||
</buildScan>
|
||||
<buildCache>
|
||||
<local>
|
||||
<enabled>true</enabled>
|
||||
</local>
|
||||
<remote>
|
||||
<enabled>true</enabled>
|
||||
<!-- Check credentials presence to avoid build cache errors on PR builds when credentials are not present -->
|
||||
<storeEnabled>#{isTrue(env['CI']) and isTrue(env['GRADLE_ENTERPRISE_ACCESS_KEY'])}</storeEnabled>
|
||||
</remote>
|
||||
</buildCache>
|
||||
</develocity>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>com.gradle</groupId>
|
||||
<artifactId>develocity-maven-extension</artifactId>
|
||||
<version>1.21.6</version>
|
||||
</extension>
|
||||
<extension>
|
||||
<groupId>com.gradle</groupId>
|
||||
<artifactId>common-custom-user-data-maven-extension</artifactId>
|
||||
<version>1.12.5</version>
|
||||
</extension>
|
||||
</extensions>
|
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file → Executable file
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file → Executable file
Binary file not shown.
19
.mvn/wrapper/maven-wrapper.properties
vendored
19
.mvn/wrapper/maven-wrapper.properties
vendored
@ -1,18 +1 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.8/apache-maven-3.8.8-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
|
||||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip
|
229
.travis.yml
229
.travis.yml
@ -1,17 +1,10 @@
|
||||
sudo: required
|
||||
language: java
|
||||
jdk:
|
||||
- openjdk11
|
||||
- openjdk8
|
||||
|
||||
# See https://docs.travis-ci.com/user/languages/java/#caching
|
||||
before_cache:
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
# Avoid caching our built dependencies between runs.
|
||||
- rm -fr $HOME/.m2/repository/org/openapitools/
|
||||
|
||||
cache:
|
||||
yarn: true
|
||||
directories:
|
||||
- $HOME/.m2
|
||||
- $HOME/.ivy2
|
||||
@ -21,103 +14,50 @@ cache:
|
||||
- $HOME/samples/client/petstore/php/OpenAPIToolsClient-php/vendor
|
||||
- $HOME/samples/client/petstore/ruby/vendor/bundle
|
||||
- $HOME/samples/client/petstore/python/.venv/
|
||||
- $HOME/samples/client/petstore/typescript-node/npm/node_modules
|
||||
- $HOME/samples/client/petstore/typescript-node/npm/typings/
|
||||
- $HOME/samples/client/petstore/typescript-fetch/tests/default/node_modules
|
||||
- $HOME/samples/client/petstore/typescript-fetch/tests/default/typings
|
||||
- $HOME/samples/client/petstore/typescript-fetch/builds/default/node_modules
|
||||
- $HOME/samples/client/petstore/typescript-fetch/builds/default/typings
|
||||
- $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/node_modules
|
||||
- $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/typings
|
||||
- $HOME/samples/client/petstore/typescript-fetch/builds/with-npm-version/node_modules
|
||||
- $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings
|
||||
- $HOME/samples/client/petstore/typescript-angular/node_modules
|
||||
- $HOME/samples/client/petstore/typescript-angular/typings
|
||||
- $HOME/samples/server/petstore/rust-server/target
|
||||
- $HOME/samples/server/petstore/rust-axum/target
|
||||
- $HOME/perl5
|
||||
- $HOME/.cargo
|
||||
- $HOME/.pub-cache
|
||||
- $HOME/samples/server/petstore/cpp-pistache/pistache
|
||||
- $HOME/.rvm/gems/ruby-2.4.1
|
||||
- $HOME/website/node_modules/
|
||||
- $HOME/.cache/deno
|
||||
- $HOME/.phpenv/versions/8.1.4
|
||||
- $HOME/.stack
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
# comment out the host table change to use the public petstore server
|
||||
addons:
|
||||
#apt:
|
||||
# sources:
|
||||
# - ubuntu-toolchain-r-test
|
||||
# packages:
|
||||
# - g++-5
|
||||
#chrome: stable
|
||||
chrome: stable
|
||||
hosts:
|
||||
- petstore.swagger.io
|
||||
|
||||
before_install:
|
||||
- sudo rm -rf /var/lib/apt/lists/*
|
||||
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"
|
||||
- sudo apt-get update
|
||||
#- sudo apt-get install -qqy --no-install-recommends google-chrome-stable
|
||||
#- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
|
||||
- mkdir -vp ~/.docker/cli-plugins/
|
||||
- curl --silent -L "https://github.com/docker/buildx/releases/download/v0.3.0/buildx-v0.3.0.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
|
||||
- chmod a+x ~/.docker/cli-plugins/docker-buildx
|
||||
|
||||
# to run petstore server locally via docker
|
||||
#- echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin || true
|
||||
#- docker pull swaggerapi/petstore
|
||||
#- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
|
||||
#- docker ps -a
|
||||
# comment out crystal installation as the tests will run on circleci or github action instead
|
||||
# install crystal
|
||||
#- echo 'deb http://download.opensuse.org/repositories/devel:/languages:/crystal/xUbuntu_16.04/ /' | sudo tee /etc/apt/sources.list.d/devel:languages:crystal.list
|
||||
#- curl -fsSL https://download.opensuse.org/repositories/devel:languages:crystal/xUbuntu_16.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_languages_crystal.gpg > /dev/null
|
||||
#- sudo apt update
|
||||
#- sudo apt install crystal
|
||||
#- crystal --version
|
||||
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.0
|
||||
- export PATH="$HOME/.yarn/bin:$PATH"
|
||||
# install rust
|
||||
#- curl https://sh.rustup.rs -sSf | sh -s -- -y -v
|
||||
## required when sudo: required for the Ruby petstore tests
|
||||
#- gem install bundler -v 2.3.26
|
||||
## set python 3.6.3 as default
|
||||
#- source ~/virtualenv/python3.6/bin/activate
|
||||
# -- skip bash test to shorten build time
|
||||
- docker pull swaggerapi/petstore
|
||||
- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
|
||||
- docker ps -a
|
||||
# Add bats test framework and cURL for Bash script integration tests
|
||||
#- sudo add-apt-repository ppa:duggan/bats --yes
|
||||
#- sudo apt-get update -qq
|
||||
#- sudo apt-get install -qq bats
|
||||
#- sudo apt-get install -qq curl
|
||||
# -- skip bash test end
|
||||
# install dart
|
||||
#- sudo apt-get update
|
||||
#- sudo apt-get install apt-transport-https
|
||||
#- sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
|
||||
#- sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
|
||||
#- sudo apt-get update
|
||||
#- sudo apt-get install dart
|
||||
# switch to php8
|
||||
#- sudo apt-get install -f libonig-dev libzip-dev
|
||||
#- git clone https://github.com/php-build/php-build $(phpenv root)/plugins/php-build
|
||||
#- git clone https://github.com/ngyuki/phpenv-composer.git $(phpenv root)/plugins/phpenv-composer
|
||||
#- if [ $(ls -A "$HOME/.phpenv/versions/8.1.4" | wc -l) -eq 0 ]; then
|
||||
# phpenv install 8.1.4;
|
||||
# fi;
|
||||
#- phpenv rehash
|
||||
#- phpenv versions
|
||||
##- phpenv global 7.2.15
|
||||
#- phpenv global 8.1.4
|
||||
#- php -v
|
||||
|
||||
# install perl module
|
||||
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
|
||||
#- cpanm Test::Exception Test::More Log::Any LWP::UserAgent JSON URI:Query Module::Runtime DateTime Module::Find Moose::Role
|
||||
# comment out below as installation failed in travis
|
||||
# Add rebar3 build tool and recent Erlang/OTP for Erlang petstore server tests.
|
||||
# - Travis CI does not support rebar3 [yet](https://github.com/travis-ci/travis-ci/issues/6506#issuecomment-275189490).
|
||||
# - Rely on `kerl` for [pre-compiled versions available](https://docs.travis-ci.com/user/languages/erlang#Choosing-OTP-releases-to-test-against). Rely on installation path chosen by [`travis-erlang-builder`](https://github.com/travis-ci/travis-erlang-builder/blob/e6d016b1a91ca7ecac5a5a46395bde917ea13d36/bin/compile#L18).
|
||||
# - . ~/otp/18.2.1/activate && erl -version
|
||||
#- curl -f -L -o ./rebar3 https://s3.amazonaws.com/rebar3/rebar3 && chmod +x ./rebar3 && ./rebar3 version && export PATH="${TRAVIS_BUILD_DIR}:$PATH"
|
||||
# install C++ tools
|
||||
#- sudo apt install -y --no-install-recommends valgrind cmake build-essential
|
||||
#- cmake --version
|
||||
# install Qt5
|
||||
#- sudo apt install -y --no-install-recommends qt5-default
|
||||
# install boost
|
||||
#- sudo apt install -y --no-install-recommends libboost-all-dev
|
||||
# perl dep
|
||||
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
|
||||
#- cpanm --quiet --no-interactive Test::Exception Test::More Log::Any LWP::UserAgent URI::Query Module::Runtime DateTime Module::Find Moose::Role JSON || echo "Ignored failure from cpanm"
|
||||
|
||||
# show host table to confirm petstore.swagger.io is mapped to localhost
|
||||
- cat /etc/hosts
|
||||
# show java version
|
||||
@ -127,93 +67,48 @@ before_install:
|
||||
gpg --keyserver keyserver.ubuntu.com --recv-key $SIGNING_KEY ;
|
||||
gpg --check-trustdb ;
|
||||
fi;
|
||||
- pushd .; cd website; yarn install; popd
|
||||
|
||||
install:
|
||||
# Add Godeps dependencies to GOPATH and PATH
|
||||
- eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)"
|
||||
- export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace"
|
||||
- export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$HOME/.cargo/bin:$PATH"
|
||||
- go version
|
||||
|
||||
script:
|
||||
# fail fast
|
||||
- set -e
|
||||
# show docker buildx version
|
||||
- docker buildx version
|
||||
# run integration tests defined in maven pom.xml
|
||||
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
|
||||
# show "error" only to reduce the log size
|
||||
- ./mvnw -e --no-snapshot-updates --quiet --batch-mode --show-version clean install -DskipTests -Dmaven.javadoc.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
- set -ev
|
||||
# fail if templates/generators contain carriage return '\r'
|
||||
- /bin/bash ./bin/utils/detect_carriage_return.sh
|
||||
# fail if generators contain merge conflicts
|
||||
- /bin/bash ./bin/utils/detect_merge_conflict.sh
|
||||
# fail if generators contain tab '\t'
|
||||
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
|
||||
- mvn verify
|
||||
after_success:
|
||||
# push to maven repo
|
||||
- if [ $SONATYPE_USERNAME ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||
if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ]; then
|
||||
echo "Publishing from branch $TRAVIS_BRANCH";
|
||||
./mvnw clean deploy --quiet -DskipTests=true -B -U -P release --settings CI/settings.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error;
|
||||
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
||||
pushd .;
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository;
|
||||
echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository";
|
||||
popd;
|
||||
elif [ -z $TRAVIS_TAG ] && [[ "$TRAVIS_BRANCH" =~ ^[0-9]+\.[0-9]+\.x$ ]]; then
|
||||
echo "Publishing from branch $TRAVIS_BRANCH";
|
||||
./mvnw clean deploy --quiet --settings CI/settings.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error;
|
||||
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
||||
pushd .;
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository;
|
||||
echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository";
|
||||
popd;
|
||||
fi;
|
||||
if [ -n $TRAVIS_TAG ] && [[ "$TRAVIS_TAG" =~ ^[v][0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "Publishing the gradle plugin to Gradle Portal on tag $TRAVIS_TAG (only)";
|
||||
pushd .;
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" publishPlugins -Dgradle.publish.key=$GRADLE_PUBLISH_KEY -Dgradle.publish.secret=$GRADLE_PUBLISH_SECRET;
|
||||
echo "Finished ./gradlew publishPlugins (plugin portal)";
|
||||
popd;
|
||||
fi;
|
||||
fi;
|
||||
## docker: build and push openapi-generator-online to DockerHub
|
||||
- if [ $DOCKER_HUB_USERNAME ]; then
|
||||
echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin;
|
||||
export cli_version=$(\mvn -o org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[');
|
||||
export build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ");
|
||||
docker buildx create --use;
|
||||
if [ ! -z "$TRAVIS_TAG" ]; then
|
||||
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=$build_date --label=org.opencontainers.image.title=openapi-generator-online --label=org.opencontainers.image.revision=$TRAVIS_COMMIT --label=org.opencontainers.image.version=$cli_version -t $DOCKER_GENERATOR_IMAGE_NAME:latest -t $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG -t $DOCKER_GENERATOR_IMAGE_NAME -t $DOCKER_GENERATOR_IMAGE_NAME:latest-release ./modules/openapi-generator-online;
|
||||
echo "Built and tagged $DOCKER_GENERATOR_IMAGE_NAME";
|
||||
fi;
|
||||
if [ -z "$TRAVIS_TAG" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
||||
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=$build_date --label=org.opencontainers.image.title=openapi-generator-online --label=org.opencontainers.image.revision=$TRAVIS_COMMIT --label=org.opencontainers.image.version=$cli_version -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/openapi-generator-online;
|
||||
echo "Pushed to $DOCKER_GENERATOR_IMAGE_NAME for master";
|
||||
fi;
|
||||
fi;
|
||||
## docker: build cli image and push to Docker Hub
|
||||
- if [ $DOCKER_HUB_USERNAME ]; then
|
||||
echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin;
|
||||
cp docker-entrypoint.sh ./modules/openapi-generator-cli;
|
||||
export cli_version=$(\mvn -o org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[');
|
||||
export build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ");
|
||||
docker buildx create --use;
|
||||
docker buildx build --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=$build_date --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$TRAVIS_COMMIT --label=org.opencontainers.image.version=$cli_version -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/openapi-generator-cli;
|
||||
if [ ! -z "$TRAVIS_TAG" ]; then
|
||||
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=$build_date --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$TRAVIS_COMMIT --label=org.opencontainers.image.version=$cli_version -t $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest -t $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG -t $DOCKER_CODEGEN_CLI_IMAGE_NAME -t $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest-release ./modules/openapi-generator-cli;
|
||||
echo "Built and tagged $DOCKER_GENERATOR_IMAGE_NAME";
|
||||
fi;
|
||||
if [ -z "$TRAVIS_TAG" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
||||
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=$build_date --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$TRAVIS_COMMIT --label=org.opencontainers.image.version=$cli_version -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/openapi-generator-cli;
|
||||
## docker build and push images to DockerHub (openapi-generator-online, openapi-generator-cli)
|
||||
- set -ev
|
||||
- read -r MVN_VERSION_FOR_DOCKER_TAG < target/ci/version-for-docker-tag.txt
|
||||
- echo "Tag for Docker derived from maven version -> $MVN_VERSION_FOR_DOCKER_TAG"; sleep 5;
|
||||
- if [ $DOCKER_HUB_USERNAME ]; then
|
||||
echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin;
|
||||
if [ ! -z "$TRAVIS_TAG" ]; then
|
||||
docker build -t $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG -t $DOCKER_GENERATOR_IMAGE_NAME:$MVN_VERSION_FOR_DOCKER_TAG ./modules/openapi-generator-online;
|
||||
docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG -t $DOCKER_GENERATOR_IMAGE_NAME:$MVN_VERSION_FOR_DOCKER_TAG ./modules/openapi-generator-cli;
|
||||
elif [ "$TRAVIS_BRANCH" == "master" ]; then
|
||||
docker build -t $DOCKER_GENERATOR_IMAGE_NAME -t $DOCKER_GENERATOR_IMAGE_NAME:$MVN_VERSION_FOR_DOCKER_TAG ./modules/openapi-generator-online;
|
||||
docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME -t $DOCKER_GENERATOR_IMAGE_NAME:$MVN_VERSION_FOR_DOCKER_TAG ./modules/openapi-generator-cli;
|
||||
else
|
||||
docker build -t $DOCKER_GENERATOR_IMAGE_NAME:$MVN_VERSION_FOR_DOCKER_TAG ./modules/openapi-generator-online;
|
||||
docker build -t $DOCKER_GENERATOR_IMAGE_NAME:$MVN_VERSION_FOR_DOCKER_TAG ./modules/openapi-generator-cli;
|
||||
fi;
|
||||
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && ([ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" == "master" ] || [ "$TRAVIS_BRANCH" == "3.1.x" ] || [ "$TRAVIS_BRANCH" == "4.0.x" ]); then
|
||||
docker push $DOCKER_GENERATOR_IMAGE_NAME;
|
||||
echo "Pushed to $DOCKER_GENERATOR_IMAGE_NAME";
|
||||
docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME;
|
||||
echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME";
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
## NOTE; we will do the followign manually instead as the page doesn't need to be updated in every single travis build
|
||||
## publish latest website, variables below are secure environment variables which are unavailable to PRs from forks.
|
||||
# - if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||
# sed -i "s/Vector{UInt8}/Vector\{UInt8\}/g" docs/generators/julia-client.md;
|
||||
# sed -i "s/Vector{UInt8}/Vector\{UInt8\}/g" docs/generators/julia-server.md;
|
||||
# cd website;
|
||||
# git config --global user.name "${GH_NAME}";
|
||||
# git config --global user.email "${GH_EMAIL}";
|
||||
# echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc;
|
||||
# yarn install;
|
||||
# GIT_USER="${GH_NAME}" yarn run publish-gh-pages;
|
||||
# fi;
|
||||
#
|
||||
sleep 5;
|
||||
env:
|
||||
- DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli NODE_ENV=test CC=gcc-5 CXX=g++-5
|
||||
|
||||
- DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli NODE_ENV=test
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user