forked from schlothauer-wauer/jsoncodegen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from schlothauer-wauer/master
Get latest code
- Loading branch information
Showing
117 changed files
with
26,132 additions
and
895 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
.idea | ||
*.log | ||
.gradle | ||
build | ||
tmp | ||
classes | ||
out | ||
*.swp | ||
pushLatest.bat | ||
src/main/groovy/de/lisaplus/atlas/DummyGenerator.groovy | ||
src/main/groovy/de/lisaplus/atlas/TestStarter.groovy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM mcr.microsoft.com/java/jdk:11u3-zulu-alpine as build | ||
|
||
RUN ["jlink", \ | ||
"--compress=2", \ | ||
"--strip-debug", \ | ||
"--no-header-files", \ | ||
"--no-man-pages", \ | ||
"--module-path", "/usr/lib/jvm/zulu-11-azure-jdk_11.31.11-11.0.3-linux_musl_x64/jmods", \ | ||
"--add-modules", "java.base,java.logging,java.desktop,java.naming,java.prefs,java.xml,java.scripting,java.sql", \ | ||
"--output", "/custom_jre"] | ||
|
||
FROM alpine:latest | ||
COPY --from=build /custom_jre /opt/jre/ | ||
|
||
RUN ln -s /opt/jre/bin/java /usr/bin/ | ||
|
||
ADD build/release /opt/jsonCodeGen/ | ||
|
||
ENTRYPOINT ["/opt/jsonCodeGen/jsonCodeGen.sh"] | ||
|
||
CMD ["--help"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
## 0.13.1 | ||
- handle the right notation of external references: e.g. ./object_base.json#/definitions/ObjectBase | ||
|
||
(Attention, the wrong reference style before that version, is still working) | ||
## 0.8.4 | ||
- add additional generator parameters to improve plantuml view (ignoreAttribs,ignoreRefs,ignoreImplicitRefs, ignoreCompositions) | ||
|
||
## 0.8.3 | ||
- ignoreTag, neededTag are handled now as lists for multi-file-generators | ||
- rename 'pmta' command line switch to specify a required attribute for main types to 'mta' | ||
- add 'tmt' command line switch to add automatically a 'mainType' tag to all main types | ||
|
||
## 0.8.2 | ||
- needed fix in 'pmta' command line switch | ||
|
||
## 0.8.1 | ||
- add to types schemaPath and schemaFileName attributes (to finally detect what are the interesting main types of a model) | ||
- add a isMainType function to model type | ||
- add command line switches pro print only main types | ||
|
||
## 0.8.0 | ||
- command line switches for type black- and white-lists | ||
- command line switch to add tags to types | ||
- command line switch to remove a tag from types | ||
- command line switch to remove a tag from all types | ||
- enforce camel-case type names in models | ||
- add guidTypeColor generator parameter for plantuml | ||
- remove printTags generator parameter for plantuml | ||
- add printTypeTags generator parameter for plantuml | ||
- add printPropTags generator parameter for plantuml | ||
|
||
## 0.7.5 | ||
- deep copy functions for types | ||
- introduce pure array type to handle definitions where arrays contain only arrays, f.e. geoJson Polygons | ||
|
||
```json | ||
... | ||
"FeatureAreaGeometry": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string" | ||
}, | ||
"coordinates": { | ||
"type": "array", | ||
"items": { | ||
"type": "array", | ||
"items": { | ||
"type": "array", | ||
"items": { | ||
"type": "number" | ||
} | ||
} | ||
} | ||
}, | ||
"projection": { | ||
"type": "string" | ||
} | ||
}, | ||
"__tags": ["additional"] | ||
}, | ||
... | ||
``` | ||
|
||
## 0.7.4 | ||
- add attributes `selfReference` and `selfContainment` to model property type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
# Example script to illustrate the template debugging option of jsonCodeGen | ||
|
||
scriptPos=${0%/*} | ||
|
||
debugStarterScript=$scriptPos/../build/release/jsonCodeGenDebug.sh | ||
if ! [ -f "$debugStarterScript" ]; then | ||
echo "debug starter script not found: $debugStarterScript" | ||
echo "Maybe release is not created. Try to create a release at first and re-run the script" | ||
echo "gradle clean buildRelease" | ||
exit 1 | ||
fi | ||
|
||
$debugStarterScript -g "multifiles=$scriptPos/../src/test/resources/templates/handling.txt" \ | ||
-gs "$scriptPos/../src/test/resources/templates/handling_helper.groovy" \ | ||
-m "$scriptPos/../src/test/resources/test_schemas/ds/incident.json" \ | ||
-o "$scriptPos/../tmp/handling" \ | ||
-gp "packageName=de.debug" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
scriptPos=${0%/*} | ||
|
||
# retrieve the version from project file | ||
version=`cat "$scriptPos/../build.gradle" | grep project.version | grep = | sed -e "s-.* '--" -e "s-'--"` | ||
echo "version: $version" | ||
|
||
pushd "$scriptPos/.." > /dev/null | ||
if ! gradle publish; then | ||
echo "error while publish jars to nexus" | ||
popd > /dev/null | ||
fi | ||
popd > /dev/null | ||
|
||
if [ -z "$NEXUS_USER" ]; then | ||
echo "NEXUS_USER not defined" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$NEXUS_RAW_ARCHIVE" ]; then | ||
echo "NEXUS_RAW_ARCHIVE not defined" | ||
exit 1 | ||
fi | ||
|
||
pushd "$scriptPos/.." > /dev/null | ||
if ! gradle clean build; then | ||
echo 'error while build' | ||
exit 1 | ||
fi | ||
|
||
if ! gradle buildRelease; then | ||
echo 'error while build release' | ||
exit 1 | ||
fi | ||
|
||
cd build/release | ||
|
||
|
||
releaseFile="jsonCodeGen_$version.tgz" | ||
|
||
if [ -f "$releaseFile" ]; then | ||
rm -f "$releaseFile" | ||
fi | ||
|
||
tar -czf "$releaseFile" * | ||
|
||
if ! curl -v --user "$NEXUS_USER" --upload-file "$releaseFile" \ | ||
"$NEXUS_RAW_ARCHIVE/$releaseFile" | ||
then | ||
echo "error while upload release to nexus raw repo" | ||
fi | ||
|
||
git tag "$version" | ||
|
||
popd > /dev/null | ||
|
Oops, something went wrong.