diff --git a/.gradle/6.8/executionHistory/executionHistory.bin b/.gradle/6.8/executionHistory/executionHistory.bin index 2f841d85f65380c32b2de70839d0e383d17321eb..5e4c87483b78bf61f4b2d2a62b806c99230af67a 100644 Binary files a/.gradle/6.8/executionHistory/executionHistory.bin and b/.gradle/6.8/executionHistory/executionHistory.bin differ diff --git a/.gradle/6.8/executionHistory/executionHistory.lock b/.gradle/6.8/executionHistory/executionHistory.lock index c60adf4b9af703eab0fa33948911253c246c6733..5101f8b2b20eafcd65518d8436a987f00c6dad44 100644 Binary files a/.gradle/6.8/executionHistory/executionHistory.lock and b/.gradle/6.8/executionHistory/executionHistory.lock differ diff --git a/.gradle/6.8/fileHashes/fileHashes.bin b/.gradle/6.8/fileHashes/fileHashes.bin index 985b9d71bd8e359751a68c3f96efa11aeee0d4bc..dcafc9c4add743b292f458b9d7d2b2cab9b388a2 100644 Binary files a/.gradle/6.8/fileHashes/fileHashes.bin and b/.gradle/6.8/fileHashes/fileHashes.bin differ diff --git a/.gradle/6.8/fileHashes/fileHashes.lock b/.gradle/6.8/fileHashes/fileHashes.lock index 0503f4e965032c410d9cabd31a3c4904046f953d..be86b867bd9a62029c9b991af1c853d1d1e4c26a 100644 Binary files a/.gradle/6.8/fileHashes/fileHashes.lock and b/.gradle/6.8/fileHashes/fileHashes.lock differ diff --git a/.gradle/6.8/fileHashes/resourceHashesCache.bin b/.gradle/6.8/fileHashes/resourceHashesCache.bin index 99d01c570c17aaf2b7fc5d3885aa4248c0cc9d69..b232f305eb5d4b6733dbd4dbbba1e7013c2f12c4 100644 Binary files a/.gradle/6.8/fileHashes/resourceHashesCache.bin and b/.gradle/6.8/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/6.8/javaCompile/classAnalysis.bin b/.gradle/6.8/javaCompile/classAnalysis.bin index af3ae55031a743718cf52c27361d2b7d356dc982..a1a3f39838c29e4e07d9da37af545bcf03190386 100644 Binary files a/.gradle/6.8/javaCompile/classAnalysis.bin and b/.gradle/6.8/javaCompile/classAnalysis.bin differ diff --git a/.gradle/6.8/javaCompile/jarAnalysis.bin b/.gradle/6.8/javaCompile/jarAnalysis.bin index d5fb54d354d44c6561e1cb62a23ed9eff2d2b8b2..bd86926f9c03211ad939e27b5039d86f382a65de 100644 Binary files a/.gradle/6.8/javaCompile/jarAnalysis.bin and b/.gradle/6.8/javaCompile/jarAnalysis.bin differ diff --git a/.gradle/6.8/javaCompile/javaCompile.lock b/.gradle/6.8/javaCompile/javaCompile.lock index 108b9d17505101b5a55ecde24c49e662c5e9199a..9de86fce88d9f2a7e783855f59854e8652932d98 100644 Binary files a/.gradle/6.8/javaCompile/javaCompile.lock and b/.gradle/6.8/javaCompile/javaCompile.lock differ diff --git a/.gradle/6.8/javaCompile/taskHistory.bin b/.gradle/6.8/javaCompile/taskHistory.bin index 98657de2e6a81e9d55cc6f1f8b1f6b7093ffd113..873c50e4717bca313c3a3853122e6b52972c4fa6 100644 Binary files a/.gradle/6.8/javaCompile/taskHistory.bin and b/.gradle/6.8/javaCompile/taskHistory.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 4be743b2d39869740dc895af51e42633e476bf43..15a2fff203622287d6f185195e8796dd2d1f8977 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 61a9130cd9669c3843e6445dfe1fee2d493869bc..001ab83a79085de6c85bd9db879b40886bc0717a 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="CompilerConfiguration"> + <annotationProcessing> + <profile name="Maven default annotation processors profile" enabled="true"> + <sourceOutputDir name="target/generated-sources/annotations" /> + <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> + <outputRelativeToContentRoot value="true" /> + <module name="jastadd-openapi" /> + </profile> + </annotationProcessing> <bytecodeTargetLevel target="1.8" /> </component> </project> \ No newline at end of file diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/OpenAPIMain.class b/build/classes/java/main/de/tudresden/inf/st/openapi/OpenAPIMain.class index ce7cf9e659fc6a86a3e5d83c9e2b360214c45b70..935127c238b8964ca08444c965ddc6e250a779ac 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/OpenAPIMain.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/OpenAPIMain.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode$1.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode$1.class index 68fdbd88408d5d3f7cf185cb1c4b0ad036a2f1a4..b968065ddbc8fea7cfce5c67a1b7f8b2552316c9 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode$1.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode$1.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode$2.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode$2.class index fbb2bf11f42111ef54239d0da0b8bb2bf42ac856..ac491b3299d722b5af5166e1d5b6e945f0a6a403 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode$2.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode$2.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode.class index 4edf67b4e0c04d985cbade7c7ca29ed7031ba75b..64f3bfb2de435915272d34b604714cd70e28f59a 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation$Kind.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation$Kind.class index 56113fda49a7801347e3c8c408fea42e2a0a3b84..b55a4eb5a17ccd04d946aab5ce5c26bc4490a5ee 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation$Kind.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation$Kind.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation.class index b0cca9d1d01aa0ca656cad17f4783b50772ac8f6..124668562639e0962c99069f49d69e7051b53bcf 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState$CircleState.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState$CircleState.class index 4a38929560bd69a8e8c8f30e4fcee491045d2991..88de9ad021c67492090b4ed1089d2001949d11c4 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState$CircleState.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState$CircleState.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState$CircularValue.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState$CircularValue.class index 6c7db03237774cfe76e9697dffb5c92136dc7994..65ff060dfecf66bf3c6d8a77e1c4c7777f791b9d 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState$CircularValue.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState$CircularValue.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState$Cycle.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState$Cycle.class index 25f6feb1f44a92aa1c22e46e874d001da722ea36..5e5599d81a1b43c1aaf9bff79f189e4abeaca846 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState$Cycle.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState$Cycle.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState.class index 0c0bedb4f3121cbd0463152f012de8b0d66727b9..20858b28c5edb93f459310472412af3d76300a07 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTState.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AdditionalProperties.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AdditionalProperties.class index f749cf56842c4c745a95b18df01e88c565950ff0..645f4a449a8b172cfcf8259721747cc0e229d7c2 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AdditionalProperties.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AdditionalProperties.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AllOfSchema.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AllOfSchema.class index 34d0699e281d56e4150d7cdfec5f684de7c8ff93..04b5139c7b1a6d62ee79a0ae30adb1542e466966 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AllOfSchema.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AllOfSchema.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AnyOfSchema.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AnyOfSchema.class index 93c522c35782c0bfbfcc209a5b30c57e00bc886f..a14a0fed35ac6c148e8923f3ba24eabacbecd28d 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AnyOfSchema.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AnyOfSchema.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AttributeValue.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AttributeValue.class index c2e4934a7f1d40a4cf8cdeac25ee6292f5197b51..c658fe54a7d65610f44ee9dc2afb24ac961027b2 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AttributeValue.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AttributeValue.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AuthorizationCode.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AuthorizationCode.class index eab3cc049d86a2f2e90b11c391f1581aed3deebb..22825c330b18a3c435592e3ce134cf0dbae6bd49 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AuthorizationCode.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/AuthorizationCode.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackObject.class index 8c485518ba28caf23e34b93adb5556d3669cdf37..60a3985475ccd04bee05080bd8ba039be7dd1068 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackObjectTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackObjectTuple.class deleted file mode 100644 index 7af956f7b8cd1dfd3392c252d06865b6027d2b83..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackObjectTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackReferenceTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackReferenceTuple.class deleted file mode 100644 index e3df775605bba0d019eccf6637bf2ae1282a2b2e..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackReferenceTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackTuple.class new file mode 100644 index 0000000000000000000000000000000000000000..066bc0eee555ec16b393320f0bdd8ee4104f88b5 Binary files /dev/null and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbackTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbacksTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbacksTuple.class deleted file mode 100644 index 05f465674a9c7f3a398d1263dd57b958f43c066b..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/CallbacksTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ClientCredentials.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ClientCredentials.class index bbe86395e862ccc1632fe1b430bd8641b3481c41..58ccfc7bdc3091fa862f031a80d887e452ba4c9d 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ClientCredentials.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ClientCredentials.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ComponentsObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ComponentsObject.class index 1fe023a026df6d29f387753aa3081364af802f04..a6520e6d002a14c5c3af0643efd5ab1cf2e99754 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ComponentsObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ComponentsObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContactObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContactObject.class index 74ebd3084508f46c10ce6bd3a0d99c7c1293efba..0592de773c095e777240c71d9a99673f4cdfb7e0 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContactObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContactObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContentObjectTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContentObjectTuple.class deleted file mode 100644 index 7aed78a2eaeb3aad080200a21b49d080ede3dfe5..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContentObjectTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContentReferenceTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContentReferenceTuple.class deleted file mode 100644 index fb1f369a56db8a66ea40837c3fbb47d11cf76cbb..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContentReferenceTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContentTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContentTuple.class index b8e6f5a7b06f0a10c8eb18d46f50d851a126de4e..454dae64825d4695ee21a9c84465fc85689ca675 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContentTuple.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ContentTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Delete.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Delete.class index 31727b3cee6d09fdc25da0dea7817deb94a28434..b7bd953f5d8d21698afbb487654d1e3adee05a28 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Delete.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Delete.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/DeprecatedBoolean.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/DeprecatedBoolean.class deleted file mode 100644 index 8fb72e74d33057cdf39d038e9840cc86fade4c1e..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/DeprecatedBoolean.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.class index b45d7681e3e814e7432ef60ecb9c8b4d562e2179..d96c2dac34f799d3c223a13841d435b5c32336f3 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingObject.class index acd9483a6d41b8d73b97eaea2d4ab8f2f8f06e57..18853296d332d0982eb839e919a991f3c374a52e 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingObjectTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingObjectTuple.class deleted file mode 100644 index 903904cb2617404ae30427ebcd36bf5909754096..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingObjectTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingReferenceTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingReferenceTuple.class deleted file mode 100644 index 39ac44a40755885cdd655eabac27f3c55c51c255..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingReferenceTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingTuple.class index 1f500c899878641d39b09161f1c836e75d7da1e6..1c786885ff80d894c72a87fea996b95f49ecada5 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingTuple.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EncodingTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Enum.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Enum.class index bc22f35fd7ad649df849320fe5c924e2ad1bcf3e..dc3b080ed4840502d72cc2a87b56df2edf796068 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Enum.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Enum.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EnumObj.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EnumObj.class index a870653eb46cb321dfd810b9ee72e917e2f2c170..a364610e1b595427c577410081e8af30df376e79 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EnumObj.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/EnumObj.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleObject.class index 8bfc4202532af93206925fc097b218c1e091d832..812c2ad612d661581c94db26591e2d085df21bbd 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleObjectTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleObjectTuple.class deleted file mode 100644 index 411469cf49ace4bd992e8c4ee7013a41a79ce836..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleObjectTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleReferenceTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleReferenceTuple.class deleted file mode 100644 index 613e627a582057d05a9f098ac65d0ffce85df00b..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleReferenceTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleTuple.class new file mode 100644 index 0000000000000000000000000000000000000000..f6af1d612b8215c4685498393f9bae6d833bb3fa Binary files /dev/null and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExampleTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExamplesTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExamplesTuple.class deleted file mode 100644 index eacae60d0dc41db557e7394c036e2bc25d751eb4..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExamplesTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Expression.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Expression.class index 4d362a8efad17455eea3eb3f81bd97e30b9ab714..9ba5670788b159d85736c3a01c6ed924c01233c3 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Expression.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Expression.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Extension.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Extension.class new file mode 100644 index 0000000000000000000000000000000000000000..52bcba061155fba26afe2e1d3c246374c3daa8b6 Binary files /dev/null and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Extension.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExternalDocObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExternalDocObject.class new file mode 100644 index 0000000000000000000000000000000000000000..4d849dbc2b772bcdbc6e84d1a59a24ec5ea0e656 Binary files /dev/null and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExternalDocObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExternalDocumentationObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExternalDocumentationObject.class deleted file mode 100644 index e78987cc9b68c4d5303e1b214e763669857dd8fd..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ExternalDocumentationObject.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Flows.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Flows.class deleted file mode 100644 index 89d4d64993ee0f2ae8d3e79852625285a881c820..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Flows.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Get.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Get.class index 76a129d2d40d5848383420b37f2526c820fc1720..1d26075072f6ef5ca160d4c43b0b75cbab714861 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Get.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Get.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HTTPStatusCode.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HTTPStatusCode.class deleted file mode 100644 index d2011f6f7784c66ebbb9c41fbdfe2e2712eb1d6d..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HTTPStatusCode.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HTTPStatusCodeReference.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HTTPStatusCodeReference.class deleted file mode 100644 index 0eede4c77b9d58d38c0e3c6a8c73f0226e042519..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HTTPStatusCodeReference.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Head.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Head.class index e53f0de3ec6af87f86c8c5f38c7024e62aeaea07..f3111f1a5dcde74401d571d6d41e55caca1aeace 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Head.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Head.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderObject.class index ace8f44ef893bf342c6161123c38fd6b07bc2253..d9e22a51d38646e83b0cb1f8c08c2fea3b41d8db 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderObjectTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderObjectTuple.class deleted file mode 100644 index e81c7b4dca699cc28de55a1d272a26183c301557..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderObjectTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderReferenceTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderReferenceTuple.class deleted file mode 100644 index 94c5d5f5d6b076e9c8e4db817155a41fc5ebed5e..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderReferenceTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderTuple.class new file mode 100644 index 0000000000000000000000000000000000000000..39ef9a29e70f715720af71c8962f023c12ef9fad Binary files /dev/null and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeaderTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeadersTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeadersTuple.class deleted file mode 100644 index efbd70089794c522cd2530bdf89ec81416874e80..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/HeadersTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Implicit.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Implicit.class index dd4ffc57b1029e2958c9616c6c737b97fb793a9a..cc543e3eae8a81bc4f5e31b3918f7ae4a9f7381f 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Implicit.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Implicit.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/InfoObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/InfoObject.class index 4748c7e61b3ed1e1a1df48c54927b7d4a4fda7ab..a4be59e7efec7aeb59b853b3e07c2327b862f70f 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/InfoObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/InfoObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ItemsSchema.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ItemsSchema.class index eb5a93070c75a1190ec913fe6803e086d6564f97..952cb1b5c75805368620d59d3e23779349f1f255 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ItemsSchema.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ItemsSchema.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/JastAddList.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/JastAddList.class index c3e48fa356026b4fb542c6d95e3ef3626e4d8294..8a94500fc0e849acde60737c1672151e44dfad53 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/JastAddList.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/JastAddList.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LicenseObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LicenseObject.class index ee31e5a57996345b0b168cca2a6164a8af6f5da9..1d53a56a8c7d2143f6056275298f321bc499864b 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LicenseObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LicenseObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkObject.class index dd891caf675714fe9f53f6f71ad536d07145978d..d92db5e1b7b6b7e2321afed01e0e09d306dd2ecc 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkObjectTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkObjectTuple.class deleted file mode 100644 index df28b59c0283b076216a667a6d9605f18b618031..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkObjectTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkParameterTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkParameterTuple.class index 75a6134edafd8fa4f852764c35192fb79e9913e1..f306f45e83b823bdd0834c33d992baa04cec94b7 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkParameterTuple.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkParameterTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkReferenceTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkReferenceTuple.class deleted file mode 100644 index b6eb4ee231454469fae72380a0e7dce396768be0..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkReferenceTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkTuple.class new file mode 100644 index 0000000000000000000000000000000000000000..c13eb0114ed154226a0629c1539ceb2cb55fcd5e Binary files /dev/null and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinkTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinksTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinksTuple.class deleted file mode 100644 index 29405c08da4c5ba3fc4f06ca07eed5e4e659d4a8..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/LinksTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/MappingTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/MappingTuple.class index a7c0748e4a8eca9b36aeabb6779f512d9070f65b..30200f8143a82fb4c0ae99bd227e255900350579 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/MappingTuple.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/MappingTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/MediaTypeObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/MediaTypeObject.class index 13525fe04774133586b8a972adba233dd83edc2c..c28f601bdc5fbdf4441431983ba1ba3fda0167b5 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/MediaTypeObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/MediaTypeObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/NotSchema.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/NotSchema.class index 1aa6b202c576bb00446c3ca9f705493f896ed78e..f143974599b06b91b46bac8afbc61cf48e7d9ff8 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/NotSchema.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/NotSchema.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.class index 076d9adb77f2b675851fa13a2ad5b2f281a391d8..96ba8a8b6fecf07899a8ac3f547f946fae105fba 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.class index 7468ee59f4b54fcaecbd2ebb3f1900dbe5375a50..a0f4cbe3bbc587df9c52b36625e33b13b2df0452 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OneOfSchema.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OneOfSchema.class index 59d5b003575f543990d51a6544a937a5ca537782..5266faedf4f3cedde2f54b8482a236904ac3dd16 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OneOfSchema.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OneOfSchema.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OpenAPIObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OpenAPIObject.class index 93089e9d9e1ffc0cc925c6fe7aa4c3153d101ab5..1106621f3887f22b1c48f0cef38fa8478bd04968 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OpenAPIObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OpenAPIObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OperationObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OperationObject.class index 9994a9112cb2c68fb8868f104d82166244b17173..d8a8ac3cae4486407943685fdcffc3726ac3fbf8 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OperationObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/OperationObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Opt.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Opt.class index bd896557bfdc283449b6053e2e03c31394e6ed32..1ffd2232c527646b1d648cdc04d6911d3ad47f9f 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Opt.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Opt.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Options.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Options.class index 8b45105dc6507644b7b7d82da125b0341769c5e1..fce0df650b219c398cb3653ca4c0cdd60dc9731a 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Options.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Options.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterObject.class index fb8992824f04cae53df46822e75443eb8c5349a3..055dc9f70958036a9dc4cc2bfcc4a14fbc272aba 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterObjectTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterObjectTuple.class deleted file mode 100644 index 0a555035f97a5bccbee763ecf01fc9261ebd4c23..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterObjectTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterReferenceTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterReferenceTuple.class deleted file mode 100644 index a604680d38c2a79d6626bcad727a8ea553749a69..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterReferenceTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterTuple.class index 52d4a8e01fcceb6f7a6e032aac761b45dc569aeb..1df1c7d69e2e641bac75d2fcd97063c12b9164f5 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterTuple.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Password.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Password.class index efc4a9a04e0cc6e57160460c8bacea5986515604..a7f0e3d0a3c62fb1fc4eaa6ab97f4b8690061278 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Password.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Password.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Patch.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Patch.class index 7d0523941edb18631eeadd1c136d93434cb89e66..cc37bc69fad49a337dfd597f8984b813c7e5f2fa 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Patch.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Patch.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathItem.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathItem.class new file mode 100644 index 0000000000000000000000000000000000000000..fac5dd7f4ba341871a2a8b3bfb058fcf0e67b9a5 Binary files /dev/null and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathItem.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathItemObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathItemObject.class deleted file mode 100644 index 96d657be08d4837581eebba2a8da6ffb40cc9350..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathItemObject.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathsObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathsObject.class index 9db7e941aa0431afb37c213932b2f0923be8c84b..b3c2fbb458f326ad380b1e7faa16e40e3a1aa532 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathsObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathsObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Post.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Post.class index 8b1f48105f9de634516ceb8fe9a5234db660d28c..eba631474aa356de4a15c5e2fbbb12cb4378776e 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Post.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Post.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PropertyItem.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PropertyItem.class index 0c4852e3038b65d4a5524f7979d39c47babd2848..0ddb4484856f321aeb38d7d3ab94ea683ef5de46 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PropertyItem.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PropertyItem.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Put.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Put.class index 0f608f175b8923b47c0f146476285293949845d9..a58e5031f448e55ac01ccf732e458b2d7d88620c 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Put.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Put.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodiesTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodiesTuple.class deleted file mode 100644 index 3fc0611e206c7c8ce26b59f287f5f374ccf70029..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodiesTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyObject.class index 9d8053b89b05695d78db55a2947ea568c6e5dabd..93a067e1becd79ada62cb13f8c4cbe1648583ae0 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyObjectTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyObjectTuple.class deleted file mode 100644 index 5dd2c1803455c4f6628e3264d3af17e31331fe9e..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyObjectTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyReferenceTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyReferenceTuple.class deleted file mode 100644 index b238d08002d504f0fdaf541583f8cdbc36369c47..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyReferenceTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyTuple.class new file mode 100644 index 0000000000000000000000000000000000000000..b9638a6a29fb4a99712c283f0db0a8adec613b1c Binary files /dev/null and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequestBodyTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequiredField.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequiredField.class index 611f0d5e4482741c541b39008ebc5ed950f8502e..b74dbd934fb482b52ff47712465e0ea1906fc448 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequiredField.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/RequiredField.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseObject.class index 844c0d93a6700a3f2f8d965ad450641d6d78f643..e818c6fd0060c123061ce0c17fff91616e4f8e70 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseObjectTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseObjectTuple.class deleted file mode 100644 index beace77ab6b29d2cd71b8d5edb7e3a19092af4fb..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseObjectTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseReferenceTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseReferenceTuple.class deleted file mode 100644 index 6ed1f50e9c497514b3d7f83968634dfed371be61..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseReferenceTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseTuple.class new file mode 100644 index 0000000000000000000000000000000000000000..0734256018b32bfa9a133dcff927886c7fef99a3 Binary files /dev/null and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponseTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponsesObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponsesObject.class deleted file mode 100644 index 902eec462f664dbc0a08a126c9379c68a5c03b7a..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponsesObject.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponsesTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponsesTuple.class deleted file mode 100644 index b8cc2d5a2804c70ec73befe38b5650e7f37d3bb1..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ResponsesTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaObject.class index 976027ba7fd1c2a1cd32e0e2c5fab17b951f84f2..7a51057a39a4ffe0b4f362389dd396681b88ca1b 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaObjectTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaObjectTuple.class deleted file mode 100644 index 8ffc648a272f27f1f5c68807786c74a96b7ae070..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaObjectTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaReferenceTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaReferenceTuple.class deleted file mode 100644 index 0368f990af94032df9ef4c27e6f582522030ef92..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaReferenceTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaTuple.class new file mode 100644 index 0000000000000000000000000000000000000000..6392c29b3a8ec8ef0ae4d472e2a9a168adde9681 Binary files /dev/null and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemasTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemasTuple.class deleted file mode 100644 index 1ce0b352604269f587c9c03022365587a216ab97..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemasTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ScopesTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ScopesTuple.class index be7e04719a10db0371b3f8381049243247be0b67..9d1d82a7c6adf4f223858f1168a796fdbf49c2b5 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ScopesTuple.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ScopesTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.class index 855dc57a8a5b5c176aaa603a2b120b74c94eb44a..4203184f4170b41b88c8c3634485777d52d96004 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecurityRequirementTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecurityRequirementTuple.class index 60a3e57d1d412c2fc9baa242950a62ad00e03c20..9d406836d09916eac41629657c9ca656e6d664b2 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecurityRequirementTuple.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecurityRequirementTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecurityRequirementValue.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecurityRequirementValue.class index 4063274fe8e77edd54b6e9eb1cb5d7aa5174d488..3e9bbd74241ad81d7491eb8b6ed613d2f3c1a723 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecurityRequirementValue.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecurityRequirementValue.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.class index 0047fd2543e6830d9c2ae6861a3280ab78410dd8..bebe50521c6be7ec0e7ce9d7e05d0bcc90357a8e 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeObjectTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeObjectTuple.class deleted file mode 100644 index 3d382cce86c11bcad65f3a8daff37c5742f128ff..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeObjectTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeReferenceTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeReferenceTuple.class deleted file mode 100644 index dc8c4c62983af17bcb26f3ca81a6290871f3361b..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeReferenceTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeTuple.class new file mode 100644 index 0000000000000000000000000000000000000000..090e44d6741244d40f0c944f3018d4cd3845ea66 Binary files /dev/null and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemeTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemesTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemesTuple.class deleted file mode 100644 index a6518d8b9d2c6b350e9de90d63e3df26759a7593..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SecuritySchemesTuple.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ServerObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ServerObject.class index 9128d1d51c0a23ea07fbb0569c484dfa5751953d..250c8ecefbdf603a88982173f6abc7193a2fd53b 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ServerObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ServerObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ServerVariableObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ServerVariableObject.class index 6b2abebb426d92bc55875cb06d857c76854b8b34..58e6c5ccd4f5d0ed76240295e00e266c5e1e7096 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ServerVariableObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ServerVariableObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ServerVariablesTuple.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ServerVariablesTuple.class index 03a36323a7d3befcae71a284a2189920caba40f5..57fd67daa43006bd2fb5ab48f27258dd0d3c467e 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ServerVariablesTuple.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ServerVariablesTuple.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Tag.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Tag.class index 8e9baefdcf6ef8d6339b8ce13c2c7c2b6a5ad86c..89c4d48998592535c40cc900f785917dece43dd5 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Tag.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Tag.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/TagObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/TagObject.class index f12797e38935d0666487aa3f179e367d4c6710b2..291505eb6ff1d9c3acc317bc1e5608415cc47543 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/TagObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/TagObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Trace.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Trace.class index c60484019da953c386b7762467defce915205a2c..9a8e096381d20e3776c14d7fc8cace764765e965 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Trace.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/Trace.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/XmlObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/XmlObject.class index 88d2db343f081119d564a86d7f593d82f550d392..b7aa0ddd4766e7c29c436cf283385d4e2a29a47e 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/XmlObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/XmlObject.class differ diff --git a/build/classes/java/test/openapi/OpenAPIMain_test.class b/build/classes/java/test/openapi/OpenAPIMain_test.class index b75eda80f274e24ffc35036c0c64c7f36a853f3b..515157f38012eb253d09896e647d651685b049e9 100644 Binary files a/build/classes/java/test/openapi/OpenAPIMain_test.class and b/build/classes/java/test/openapi/OpenAPIMain_test.class differ diff --git a/build/reports/tests/test/classes/openapi.OpenAPIMain_test.html b/build/reports/tests/test/classes/openapi.OpenAPIMain_test.html index b1cdc28d2b2dd3960d0cbb0f0dabf9659f4595fc..2fa5c062a7b1737b0f7f2e3064e77b6c5bd51865 100644 --- a/build/reports/tests/test/classes/openapi.OpenAPIMain_test.html +++ b/build/reports/tests/test/classes/openapi.OpenAPIMain_test.html @@ -29,7 +29,7 @@ </td> <td> <div class="infoBox" id="failures"> -<div class="counter">1</div> +<div class="counter">0</div> <p>failures</p> </div> </td> @@ -41,7 +41,7 @@ </td> <td> <div class="infoBox" id="duration"> -<div class="counter">0.542s</div> +<div class="counter">0.346s</div> <p>duration</p> </div> </td> @@ -50,8 +50,8 @@ </div> </td> <td> -<div class="infoBox failures" id="successRate"> -<div class="percent">0%</div> +<div class="infoBox success" id="successRate"> +<div class="percent">100%</div> <p>successful</p> </div> </td> @@ -61,123 +61,13 @@ <div id="tabs"> <ul class="tabLinks"> <li> -<a href="#tab0">Failed tests</a> -</li> -<li> -<a href="#tab1">Tests</a> +<a href="#tab0">Tests</a> </li> <li> -<a href="#tab2">Standard output</a> +<a href="#tab1">Standard output</a> </li> </ul> <div id="tab0" class="tab"> -<h2>Failed tests</h2> -<div class="test"> -<a name="test()"></a> -<h3 class="failures">test()</h3> -<span class="code"> -<pre>OpenApi3 validation failure -Validation error(s) : -components.schemas.Error.required.required: Duplicated values in 'required'. (code: 101) -From: components.schemas.Error.required.required - - at org.openapi4j.parser.validation.v3.OpenApi3Validator.validate(OpenApi3Validator.java:28) - at openapi.OpenAPIMain_test.test(OpenAPIMain_test.java:71) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688) - at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) - at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149) - at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140) - at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84) - at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) - at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) - at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) - at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) - at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:210) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:206) - at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:131) - at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:65) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) - at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) - at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) - at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) - at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) - at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) - at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) - at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) - at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) - at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108) - at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) - at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) - at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) - at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) - at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96) - at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75) - at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99) - at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79) - at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75) - at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) - at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) - at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) - at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) - at com.sun.proxy.$Proxy2.stop(Unknown Source) - at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:133) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) - at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) - at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182) - at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164) - at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414) - at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) - at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) - at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) - at java.base/java.lang.Thread.run(Thread.java:829) -</pre> -</span> -</div> -</div> -<div id="tab1" class="tab"> <h2>Tests</h2> <table> <thead> @@ -188,17 +78,191 @@ From: components.schemas.Error.required.required </tr> </thead> <tr> -<td class="failures">test()</td> -<td class="failures">0.542s</td> -<td class="failures">failed</td> +<td class="success">test()</td> +<td class="success">0.346s</td> +<td class="success">passed</td> </tr> </table> </div> -<div id="tab2" class="tab"> +<div id="tab1" class="tab"> <h2>Standard output</h2> <span class="code"> -<pre>Loading expression DSL file 'petstore-expanded.json'. -Is the source object valid? : true +<pre>Loading expression DSL file 'api-with-examples.json'. +Loading expression DSL file 'callback-example.json'. +null +null +null +null +null +null +Loading expression DSL file 'link-example.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +Loading expression DSL file 'petstore-expanded.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +Loading expression DSL file 'petstore.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +Loading expression DSL file 'richard_mueller4-MatchinitAPI-1-swagger.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +Loading expression DSL file 'uspto.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +false +null +null +null +null +null +null +null +null </pre> </span> </div> @@ -210,7 +274,7 @@ Is the source object valid? : true <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/> </label> </div>Generated by -<a href="http://www.gradle.org">Gradle 6.8</a> at 2021. 8. 13. 오후 3:52:46</p> +<a href="http://www.gradle.org">Gradle 6.8</a> at 2021. 8. 15. ì˜¤ì „ 3:53:32</p> </div> </div> </body> diff --git a/build/reports/tests/test/index.html b/build/reports/tests/test/index.html index 14e205cb83aa62c2484254c2805aa69d09ad6760..2e5a1cbb1b2254737c66a78ee9d6474762255fbc 100644 --- a/build/reports/tests/test/index.html +++ b/build/reports/tests/test/index.html @@ -26,7 +26,7 @@ </td> <td> <div class="infoBox" id="failures"> -<div class="counter">1</div> +<div class="counter">0</div> <p>failures</p> </div> </td> @@ -38,7 +38,7 @@ </td> <td> <div class="infoBox" id="duration"> -<div class="counter">0.542s</div> +<div class="counter">0.346s</div> <p>duration</p> </div> </td> @@ -47,8 +47,8 @@ </div> </td> <td> -<div class="infoBox failures" id="successRate"> -<div class="percent">0%</div> +<div class="infoBox success" id="successRate"> +<div class="percent">100%</div> <p>successful</p> </div> </td> @@ -58,25 +58,13 @@ <div id="tabs"> <ul class="tabLinks"> <li> -<a href="#tab0">Failed tests</a> -</li> -<li> -<a href="#tab1">Packages</a> +<a href="#tab0">Packages</a> </li> <li> -<a href="#tab2">Classes</a> +<a href="#tab1">Classes</a> </li> </ul> <div id="tab0" class="tab"> -<h2>Failed tests</h2> -<ul class="linkList"> -<li> -<a href="classes/openapi.OpenAPIMain_test.html">OpenAPIMain_test</a>. -<a href="classes/openapi.OpenAPIMain_test.html#test()">test()</a> -</li> -</ul> -</div> -<div id="tab1" class="tab"> <h2>Packages</h2> <table> <thead> @@ -91,19 +79,19 @@ </thead> <tbody> <tr> -<td class="failures"> +<td class="success"> <a href="packages/openapi.html">openapi</a> </td> <td>1</td> -<td>1</td> <td>0</td> -<td>0.542s</td> -<td class="failures">0%</td> +<td>0</td> +<td>0.346s</td> +<td class="success">100%</td> </tr> </tbody> </table> </div> -<div id="tab2" class="tab"> +<div id="tab1" class="tab"> <h2>Classes</h2> <table> <thead> @@ -118,14 +106,14 @@ </thead> <tbody> <tr> -<td class="failures"> +<td class="success"> <a href="classes/openapi.OpenAPIMain_test.html">openapi.OpenAPIMain_test</a> </td> <td>1</td> -<td>1</td> <td>0</td> -<td>0.542s</td> -<td class="failures">0%</td> +<td>0</td> +<td>0.346s</td> +<td class="success">100%</td> </tr> </tbody> </table> @@ -138,7 +126,7 @@ <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/> </label> </div>Generated by -<a href="http://www.gradle.org">Gradle 6.8</a> at 2021. 8. 13. 오후 3:52:46</p> +<a href="http://www.gradle.org">Gradle 6.8</a> at 2021. 8. 15. ì˜¤ì „ 3:53:32</p> </div> </div> </body> diff --git a/build/reports/tests/test/packages/openapi.html b/build/reports/tests/test/packages/openapi.html index dc6ae7bada820984ef68649005fd5a7efa59c2ef..12e4453920eb0e5faf026a87c9940b1aed001e6e 100644 --- a/build/reports/tests/test/packages/openapi.html +++ b/build/reports/tests/test/packages/openapi.html @@ -28,7 +28,7 @@ </td> <td> <div class="infoBox" id="failures"> -<div class="counter">1</div> +<div class="counter">0</div> <p>failures</p> </div> </td> @@ -40,7 +40,7 @@ </td> <td> <div class="infoBox" id="duration"> -<div class="counter">0.542s</div> +<div class="counter">0.346s</div> <p>duration</p> </div> </td> @@ -49,8 +49,8 @@ </div> </td> <td> -<div class="infoBox failures" id="successRate"> -<div class="percent">0%</div> +<div class="infoBox success" id="successRate"> +<div class="percent">100%</div> <p>successful</p> </div> </td> @@ -60,22 +60,10 @@ <div id="tabs"> <ul class="tabLinks"> <li> -<a href="#tab0">Failed tests</a> -</li> -<li> -<a href="#tab1">Classes</a> +<a href="#tab0">Classes</a> </li> </ul> <div id="tab0" class="tab"> -<h2>Failed tests</h2> -<ul class="linkList"> -<li> -<a href="../classes/openapi.OpenAPIMain_test.html">OpenAPIMain_test</a>. -<a href="../classes/openapi.OpenAPIMain_test.html#test()">test()</a> -</li> -</ul> -</div> -<div id="tab1" class="tab"> <h2>Classes</h2> <table> <thread> @@ -89,14 +77,14 @@ </tr> </thread> <tr> -<td class="failures"> +<td class="success"> <a href="../classes/openapi.OpenAPIMain_test.html">OpenAPIMain_test</a> </td> <td>1</td> -<td>1</td> <td>0</td> -<td>0.542s</td> -<td class="failures">0%</td> +<td>0</td> +<td>0.346s</td> +<td class="success">100%</td> </tr> </table> </div> @@ -108,7 +96,7 @@ <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/> </label> </div>Generated by -<a href="http://www.gradle.org">Gradle 6.8</a> at 2021. 8. 13. 오후 3:52:46</p> +<a href="http://www.gradle.org">Gradle 6.8</a> at 2021. 8. 15. ì˜¤ì „ 3:53:32</p> </div> </div> </body> diff --git a/build/test-results/test/TEST-openapi.OpenAPIMain_test.xml b/build/test-results/test/TEST-openapi.OpenAPIMain_test.xml index fafedc7e218b840198d78ca6db804f4da6d7e40f..e5d089023f25969c98eb0a840d722021fa8f378e 100644 --- a/build/test-results/test/TEST-openapi.OpenAPIMain_test.xml +++ b/build/test-results/test/TEST-openapi.OpenAPIMain_test.xml @@ -1,108 +1,183 @@ <?xml version="1.0" encoding="UTF-8"?> -<testsuite name="openapi.OpenAPIMain_test" tests="1" skipped="0" failures="1" errors="0" timestamp="2021-08-13T06:52:45" hostname="MacBook-Air-von-Jueun.local" time="0.542"> +<testsuite name="openapi.OpenAPIMain_test" tests="1" skipped="0" failures="0" errors="0" timestamp="2021-08-14T18:53:31" hostname="DESKTOP-RAH69DT" time="0.346"> <properties/> - <testcase name="test()" classname="openapi.OpenAPIMain_test" time="0.542"> - <failure message="OpenApi3 validation failure Validation error(s) : components.schemas.Error.required.required: Duplicated values in 'required'. (code: 101) From: components.schemas.Error.required.required " type="org.openapi4j.core.validation.ValidationException">OpenApi3 validation failure -Validation error(s) : -components.schemas.Error.required.required: Duplicated values in 'required'. (code: 101) -From: components.schemas.Error.required.required - - at org.openapi4j.parser.validation.v3.OpenApi3Validator.validate(OpenApi3Validator.java:28) - at openapi.OpenAPIMain_test.test(OpenAPIMain_test.java:71) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688) - at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) - at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149) - at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140) - at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84) - at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) - at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) - at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) - at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) - at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) - at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:210) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:206) - at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:131) - at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:65) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) - at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) - at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) - at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) - at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129) - at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127) - at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126) - at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84) - at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) - at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) - at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) - at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108) - at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) - at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) - at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) - at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) - at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96) - at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75) - at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99) - at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79) - at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75) - at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) - at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) - at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) - at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) - at com.sun.proxy.$Proxy2.stop(Unknown Source) - at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:133) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) - at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) - at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182) - at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164) - at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414) - at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) - at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) - at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) - at java.base/java.lang.Thread.run(Thread.java:829) -</failure> - </testcase> - <system-out><![CDATA[Loading expression DSL file 'petstore-expanded.json'. -Is the source object valid? : true + <testcase name="test()" classname="openapi.OpenAPIMain_test" time="0.346"/> + <system-out><![CDATA[Loading expression DSL file 'api-with-examples.json'. +Loading expression DSL file 'callback-example.json'. +null +null +null +null +null +null +Loading expression DSL file 'link-example.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +Loading expression DSL file 'petstore-expanded.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +Loading expression DSL file 'petstore.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +Loading expression DSL file 'richard_mueller4-MatchinitAPI-1-swagger.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +Loading expression DSL file 'uspto.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +false +null +null +null +null +null +null +null +null ]]></system-out> <system-err><![CDATA[]]></system-err> </testsuite> diff --git a/build/test-results/test/binary/output.bin b/build/test-results/test/binary/output.bin index 9acd6132c0f8e7e2fe35cfd7325c4bc66ea80531..1c868c9b1f9a5615f063a86a44004e60255a4ec8 100644 --- a/build/test-results/test/binary/output.bin +++ b/build/test-results/test/binary/output.bin @@ -1,2 +1,176 @@ -6Loading expression DSL file 'petstore-expanded.json'. -#Is the source object valid? : true +7Loading expression DSL file 'api-with-examples.json'. +6Loading expression DSL file 'callback-example.json'. +null +null +null +null +null +null +2Loading expression DSL file 'link-example.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +7Loading expression DSL file 'petstore-expanded.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +.Loading expression DSL file 'petstore.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +MLoading expression DSL file 'richard_mueller4-MatchinitAPI-1-swagger.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null ++Loading expression DSL file 'uspto.json'. +null +null +null +null +null +null +null +null +null +null +null +null +null +false +null +null +null +null +null +null +null +null diff --git a/build/test-results/test/binary/output.bin.idx b/build/test-results/test/binary/output.bin.idx index 3b74af40044d56dbdf3be83209f4dd408d6c17a9..a01fd0b76e466e36969df8b32967cc6ae401d58f 100644 Binary files a/build/test-results/test/binary/output.bin.idx and b/build/test-results/test/binary/output.bin.idx differ diff --git a/build/test-results/test/binary/results.bin b/build/test-results/test/binary/results.bin index ccc815bf05f7ea625c60663d4e61923acc15b624..3ffa010b60fe742209c1707cd978064d91c37ad9 100644 Binary files a/build/test-results/test/binary/results.bin and b/build/test-results/test/binary/results.bin differ diff --git a/src/gen-res/BuildInfo.properties b/src/gen-res/BuildInfo.properties index 7eba7ae7d57ddfdcf4c3cfbb292d10c8dbf54629..bd0d29ddafffc2e1da247666712da9d7070f1792 100644 --- a/src/gen-res/BuildInfo.properties +++ b/src/gen-res/BuildInfo.properties @@ -1,7 +1,7 @@ -#Fri, 13 Aug 2021 15:51:12 +0900 +#Sun, 15 Aug 2021 01:26:00 +0900 moduleId=openapispecification moduleName=null moduleVariant=null -timestamp=2021-08-13T15\:51Z -build.date=2021-08-13 +timestamp=2021-08-15T01\:26Z +build.date=2021-08-15 diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNode.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNode.java index b3e543d17d84649895376cb35088b9613a3af813..d542bcc33e63de1c380536e42e3b83daae8455fa 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNode.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNode.java @@ -4,6 +4,7 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation.java index 0a3a84a71c5bb2c4a5141b809fbba83ba9632e5c..83be9eae86a2f3ce92de3b73665ddec4f5c79f99 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTNodeAnnotation.java @@ -4,6 +4,7 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTState.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTState.java index 3e225df76de301aacc3b164db234c06f041e5f19..8f5303f8882b44c2987506ebf5225cf3bff51cde 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTState.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ASTState.java @@ -4,6 +4,7 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/AdditionalProperties.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/AdditionalProperties.java index 91ae34815166c4b6c3ec4feae89e8bb061964029..1cbe91334d359303c365f7010be18c420fd55c3a 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/AdditionalProperties.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/AdditionalProperties.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:130 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:92 * @astdecl AdditionalProperties : ASTNode ::= SchemaObject; * @production AdditionalProperties : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/AllOfSchema.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/AllOfSchema.java index ccc61fd502a0a9db1bec498e659d3d2d4b7666e1..95cb513af29a11f42f4ba9ee3973498c8259d250 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/AllOfSchema.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/AllOfSchema.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:136 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:98 * @astdecl AllOfSchema : ASTNode ::= SchemaObject; * @production AllOfSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/AnyOfSchema.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/AnyOfSchema.java index f1e44a42790a7b705b62b5ca8e421772e5b280a2..811a19ba12e8b91e379d95816b3f7da3ee50e8ee 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/AnyOfSchema.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/AnyOfSchema.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:137 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:99 * @astdecl AnyOfSchema : ASTNode ::= SchemaObject; * @production AnyOfSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/AttributeValue.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/AttributeValue.java index b230aee6a6b3fb3bb1aea44c4679debfe2b04ac4..6640eeac006bf567ae1051c39ea1360766d11d15 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/AttributeValue.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/AttributeValue.java @@ -4,6 +4,7 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/AuthorizationCode.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/AuthorizationCode.java index 4cc0bc0fd041715eb31b089b90ffc836f27248f5..4ad077207e2014cfbd575b181a7238e1f806267d 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/AuthorizationCode.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/AuthorizationCode.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:156 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:117 * @astdecl AuthorizationCode : ASTNode ::= OAuthFlowObject; * @production AuthorizationCode : {@link ASTNode} ::= <span class="component">{@link OAuthFlowObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObject.java index 55750d6531afde768ea3ee78321432add8b6a59a..426c3c54101b645108b2af6931de24c9e714ce64 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObject.java @@ -4,20 +4,21 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:112 - * @astdecl CallbackObject : ASTNode ::= Expression*; - * @production CallbackObject : {@link ASTNode} ::= <span class="component">{@link Expression}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:73 + * @astdecl CallbackObject : ASTNode ::= Expression* Extension* <Ref:String>; + * @production CallbackObject : {@link ASTNode} ::= <span class="component">{@link Expression}*</span> <span class="component">{@link Extension}*</span> <span class="component"><Ref:String></span>; */ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:471 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:494 */ public static Callback composeCallback (CallbackObject callbackObject){ Callback callback = new Callback(); @@ -25,7 +26,7 @@ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { if( callbackObject.getNumExpression() != 0 ){ Map<String, Path> paths = new HashMap<>(); for( Expression e : callbackObject.getExpressions() ) - paths.put( e.getName(), PathItemObject.composePath( e.getPathItemObject() )); + paths.put( e.getName(), PathItem.composePath( e.getPathItem() )); callback.setCallbackPaths(paths); } @@ -33,14 +34,14 @@ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:531 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:509 */ public static CallbackObject parseCallback(Callback callback){ CallbackObject callbackObject = new CallbackObject(); if( callback.getCallbackPaths() != null ){ for( String key : callback.getCallbackPaths().keySet() ) - callbackObject.addExpression(new Expression(key, PathItemObject.parsePath(callback.getCallbackPath(key)))); + callbackObject.addExpression(new Expression(key, PathItem.parsePath(callback.getCallbackPath(key)))); } return callbackObject; @@ -59,54 +60,57 @@ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[1]; + children = new ASTNode[2]; setChild(new JastAddList(), 0); + setChild(new JastAddList(), 1); } /** - * @declaredat ASTNode:14 + * @declaredat ASTNode:15 */ @ASTNodeAnnotation.Constructor( - name = {"Expression"}, - type = {"JastAddList<Expression>"}, - kind = {"List"} + name = {"Expression", "Extension", "Ref"}, + type = {"JastAddList<Expression>", "JastAddList<Extension>", "String"}, + kind = {"List", "List", "Token"} ) - public CallbackObject(JastAddList<Expression> p0) { + public CallbackObject(JastAddList<Expression> p0, JastAddList<Extension> p1, String p2) { setChild(p0, 0); + setChild(p1, 1); + setRef(p2); } /** @apilevel low-level - * @declaredat ASTNode:23 + * @declaredat ASTNode:26 */ protected int numChildren() { - return 1; + return 2; } /** * @apilevel internal - * @declaredat ASTNode:29 + * @declaredat ASTNode:32 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:33 + * @declaredat ASTNode:36 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:37 + * @declaredat ASTNode:40 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:41 + * @declaredat ASTNode:44 */ public CallbackObject clone() throws CloneNotSupportedException { CallbackObject node = (CallbackObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:46 + * @declaredat ASTNode:49 */ public CallbackObject copy() { try { @@ -126,7 +130,7 @@ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 + * @declaredat ASTNode:68 */ @Deprecated public CallbackObject fullCopy() { @@ -137,7 +141,7 @@ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:75 + * @declaredat ASTNode:78 */ public CallbackObject treeCopyNoTransform() { CallbackObject tree = (CallbackObject) copy(); @@ -158,7 +162,7 @@ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:95 + * @declaredat ASTNode:98 */ public CallbackObject treeCopy() { CallbackObject tree = (CallbackObject) copy(); @@ -174,10 +178,10 @@ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:109 + * @declaredat ASTNode:112 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); + return super.is$Equal(node) && (tokenString_Ref == ((CallbackObject) node).tokenString_Ref); } /** * Replaces the Expression list. @@ -289,6 +293,136 @@ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { public JastAddList<Expression> getExpressionsNoTransform() { return getExpressionListNoTransform(); } + /** + * Replaces the Extension list. + * @param list The new list node to be used as the Extension list. + * @apilevel high-level + */ + public void setExtensionList(JastAddList<Extension> list) { + setChild(list, 1); + } + /** + * Retrieves the number of children in the Extension list. + * @return Number of children in the Extension list. + * @apilevel high-level + */ + public int getNumExtension() { + return getExtensionList().getNumChild(); + } + /** + * Retrieves the number of children in the Extension list. + * Calling this method will not trigger rewrites. + * @return Number of children in the Extension list. + * @apilevel low-level + */ + public int getNumExtensionNoTransform() { + return getExtensionListNoTransform().getNumChildNoTransform(); + } + /** + * Retrieves the element at index {@code i} in the Extension list. + * @param i Index of the element to return. + * @return The element at position {@code i} in the Extension list. + * @apilevel high-level + */ + public Extension getExtension(int i) { + return (Extension) getExtensionList().getChild(i); + } + /** + * Check whether the Extension list has any children. + * @return {@code true} if it has at least one child, {@code false} otherwise. + * @apilevel high-level + */ + public boolean hasExtension() { + return getExtensionList().getNumChild() != 0; + } + /** + * Append an element to the Extension list. + * @param node The element to append to the Extension list. + * @apilevel high-level + */ + public void addExtension(Extension node) { + JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); + list.addChild(node); + } + /** @apilevel low-level + */ + public void addExtensionNoTransform(Extension node) { + JastAddList<Extension> list = getExtensionListNoTransform(); + list.addChild(node); + } + /** + * Replaces the Extension list element at index {@code i} with the new node {@code node}. + * @param node The new node to replace the old list element. + * @param i The list index of the node to be replaced. + * @apilevel high-level + */ + public void setExtension(Extension node, int i) { + JastAddList<Extension> list = getExtensionList(); + list.setChild(node, i); + } + /** + * Retrieves the Extension list. + * @return The node representing the Extension list. + * @apilevel high-level + */ + @ASTNodeAnnotation.ListChild(name="Extension") + public JastAddList<Extension> getExtensionList() { + JastAddList<Extension> list = (JastAddList<Extension>) getChild(1); + return list; + } + /** + * Retrieves the Extension list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the Extension list. + * @apilevel low-level + */ + public JastAddList<Extension> getExtensionListNoTransform() { + return (JastAddList<Extension>) getChildNoTransform(1); + } + /** + * @return the element at index {@code i} in the Extension list without + * triggering rewrites. + */ + public Extension getExtensionNoTransform(int i) { + return (Extension) getExtensionListNoTransform().getChildNoTransform(i); + } + /** + * Retrieves the Extension list. + * @return The node representing the Extension list. + * @apilevel high-level + */ + public JastAddList<Extension> getExtensions() { + return getExtensionList(); + } + /** + * Retrieves the Extension list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the Extension list. + * @apilevel low-level + */ + public JastAddList<Extension> getExtensionsNoTransform() { + return getExtensionListNoTransform(); + } + /** + * Replaces the lexeme Ref. + * @param value The new value for the lexeme Ref. + * @apilevel high-level + */ + public void setRef(String value) { + tokenString_Ref = value; + } + /** @apilevel internal + */ + protected String tokenString_Ref; + /** + * Retrieves the value for the lexeme Ref. + * @return The value for the lexeme Ref. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="Ref") + public String getRef() { + return tokenString_Ref != null ? tokenString_Ref : ""; + } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackReferenceTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackReferenceTuple.java deleted file mode 100644 index 767a9e4f5b6554a12e4b938df02eb07bffbc49e2..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackReferenceTuple.java +++ /dev/null @@ -1,199 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:56 - * @astdecl CallbackReferenceTuple : CallbacksTuple ::= <Name:String> <Ref:String>; - * @production CallbackReferenceTuple : {@link CallbacksTuple} ::= <span class="component"><Name:String></span> <span class="component"><Ref:String></span>; - - */ -public class CallbackReferenceTuple extends CallbacksTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public CallbackReferenceTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Ref"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public CallbackReferenceTuple(String p0, String p1) { - setName(p0); - setRef(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public CallbackReferenceTuple clone() throws CloneNotSupportedException { - CallbackReferenceTuple node = (CallbackReferenceTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public CallbackReferenceTuple copy() { - try { - CallbackReferenceTuple node = (CallbackReferenceTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public CallbackReferenceTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public CallbackReferenceTuple treeCopyNoTransform() { - CallbackReferenceTuple tree = (CallbackReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public CallbackReferenceTuple treeCopy() { - CallbackReferenceTuple tree = (CallbackReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((CallbackReferenceTuple) node).tokenString_Name) && (tokenString_Ref == ((CallbackReferenceTuple) node).tokenString_Ref); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObjectTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackTuple.java similarity index 73% rename from src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObjectTuple.java rename to src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackTuple.java index fa4dee46751a5fcd768b422de56a48ea4a976e38..9e0c1131f5c382645111df77e71fa1dcb0d58fe0 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObjectTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackTuple.java @@ -4,21 +4,22 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:55 - * @astdecl CallbackObjectTuple : CallbacksTuple ::= <Name:String> CallbackObject; - * @production CallbackObjectTuple : {@link CallbacksTuple} ::= <span class="component"><Name:String></span> <span class="component">{@link CallbackObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:31 + * @astdecl CallbackTuple : ASTNode ::= <Key:String> CallbackObject; + * @production CallbackTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link CallbackObject}</span>; */ -public class CallbackObjectTuple extends CallbacksTuple implements Cloneable { +public class CallbackTuple extends ASTNode<ASTNode> implements Cloneable { /** * @declaredat ASTNode:1 */ - public CallbackObjectTuple() { + public CallbackTuple() { super(); } /** @@ -35,12 +36,12 @@ public class CallbackObjectTuple extends CallbacksTuple implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "CallbackObject"}, + name = {"Key", "CallbackObject"}, type = {"String", "CallbackObject"}, kind = {"Token", "Child"} ) - public CallbackObjectTuple(String p0, CallbackObject p1) { - setName(p0); + public CallbackTuple(String p0, CallbackObject p1) { + setKey(p0); setChild(p1, 0); } /** @apilevel low-level @@ -71,16 +72,16 @@ public class CallbackObjectTuple extends CallbacksTuple implements Cloneable { /** @apilevel internal * @declaredat ASTNode:41 */ - public CallbackObjectTuple clone() throws CloneNotSupportedException { - CallbackObjectTuple node = (CallbackObjectTuple) super.clone(); + public CallbackTuple clone() throws CloneNotSupportedException { + CallbackTuple node = (CallbackTuple) super.clone(); return node; } /** @apilevel internal * @declaredat ASTNode:46 */ - public CallbackObjectTuple copy() { + public CallbackTuple copy() { try { - CallbackObjectTuple node = (CallbackObjectTuple) clone(); + CallbackTuple node = (CallbackTuple) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); @@ -99,7 +100,7 @@ public class CallbackObjectTuple extends CallbacksTuple implements Cloneable { * @declaredat ASTNode:65 */ @Deprecated - public CallbackObjectTuple fullCopy() { + public CallbackTuple fullCopy() { return treeCopyNoTransform(); } /** @@ -109,8 +110,8 @@ public class CallbackObjectTuple extends CallbacksTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:75 */ - public CallbackObjectTuple treeCopyNoTransform() { - CallbackObjectTuple tree = (CallbackObjectTuple) copy(); + public CallbackTuple treeCopyNoTransform() { + CallbackTuple tree = (CallbackTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; @@ -130,8 +131,8 @@ public class CallbackObjectTuple extends CallbacksTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:95 */ - public CallbackObjectTuple treeCopy() { - CallbackObjectTuple tree = (CallbackObjectTuple) copy(); + public CallbackTuple treeCopy() { + CallbackTuple tree = (CallbackTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); @@ -147,27 +148,27 @@ public class CallbackObjectTuple extends CallbacksTuple implements Cloneable { * @declaredat ASTNode:109 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((CallbackObjectTuple) node).tokenString_Name); + return super.is$Equal(node) && (tokenString_Key == ((CallbackTuple) node).tokenString_Key); } /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. + * Replaces the lexeme Key. + * @param value The new value for the lexeme Key. * @apilevel high-level */ - public void setName(String value) { - tokenString_Name = value; + public void setKey(String value) { + tokenString_Key = value; } /** @apilevel internal */ - protected String tokenString_Name; + protected String tokenString_Key; /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. + * Retrieves the value for the lexeme Key. + * @return The value for the lexeme Key. * @apilevel high-level */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; + @ASTNodeAnnotation.Token(name="Key") + public String getKey() { + return tokenString_Key != null ? tokenString_Key : ""; } /** * Replaces the CallbackObject child. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbacksTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbacksTuple.java deleted file mode 100644 index 4165cb3c2e4fc2e00ec1d3b00da35101e2720962..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbacksTuple.java +++ /dev/null @@ -1,100 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:54 - * @astdecl CallbacksTuple : ASTNode; - * @production CallbacksTuple : {@link ASTNode}; - - */ -public abstract class CallbacksTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public CallbacksTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** @apilevel low-level - * @declaredat ASTNode:13 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:19 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:23 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:27 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public CallbacksTuple clone() throws CloneNotSupportedException { - CallbacksTuple node = (CallbacksTuple) super.clone(); - return node; - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:42 - */ - @Deprecated - public abstract CallbacksTuple fullCopy(); - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:50 - */ - public abstract CallbacksTuple treeCopyNoTransform(); - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:58 - */ - public abstract CallbacksTuple treeCopy(); - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ClientCredentials.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ClientCredentials.java index 8a6f8c5b984236ab3caeb79636c891f78a0e23c7..cc534861d8e932fd361398d4919c86eb80820515 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ClientCredentials.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ClientCredentials.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:155 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:116 * @astdecl ClientCredentials : ASTNode ::= OAuthFlowObject; * @production ClientCredentials : {@link ASTNode} ::= <span class="component">{@link OAuthFlowObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ComponentsObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ComponentsObject.java index 46ac37701661d1eed0671b15df4833a215edc413..241f0eee8c1a78ac830c2397c145daa2cc0c9b0d 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ComponentsObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ComponentsObject.java @@ -4,297 +4,289 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:5 - * @astdecl ComponentsObject : ASTNode ::= SchemasTuple* ResponsesTuple* ParameterTuple* ExamplesTuple* RequestBodiesTuple* HeadersTuple* SecuritySchemesTuple* LinksTuple* CallbacksTuple*; - * @production ComponentsObject : {@link ASTNode} ::= <span class="component">{@link SchemasTuple}*</span> <span class="component">{@link ResponsesTuple}*</span> <span class="component">{@link ParameterTuple}*</span> <span class="component">{@link ExamplesTuple}*</span> <span class="component">{@link RequestBodiesTuple}*</span> <span class="component">{@link HeadersTuple}*</span> <span class="component">{@link SecuritySchemesTuple}*</span> <span class="component">{@link LinksTuple}*</span> <span class="component">{@link CallbacksTuple}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:22 + * @astdecl ComponentsObject : ASTNode ::= SchemaTuple* ResponseTuple* ParameterTuple* ExampleTuple* RequestBodyTuple* HeaderTuple* SecuritySchemeTuple* LinkTuple* CallbackTuple*; + * @production ComponentsObject : {@link ASTNode} ::= <span class="component">{@link SchemaTuple}*</span> <span class="component">{@link ResponseTuple}*</span> <span class="component">{@link ParameterTuple}*</span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link RequestBodyTuple}*</span> <span class="component">{@link HeaderTuple}*</span> <span class="component">{@link SecuritySchemeTuple}*</span> <span class="component">{@link LinkTuple}*</span> <span class="component">{@link CallbackTuple}*</span>; */ public class ComponentsObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:126 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:131 */ public static Components composeComponents (ComponentsObject componentsObject){ Components components = new Components(); - if( componentsObject.getNumSchemasTuple() != 0 ){ - Map<String, org.openapi4j.parser.model.v3.Schema> schemas = new HashMap<>(); - for( SchemasTuple t : componentsObject.getSchemasTuples() ){ - if( t instanceof SchemaReferenceTuple ){ - org.openapi4j.parser.model.v3.Schema schema = new org.openapi4j.parser.model.v3.Schema(); - schema.setRef(((SchemaReferenceTuple) t).getRef()); - schemas.put(((SchemaReferenceTuple) t).getName(), schema); + if( componentsObject.getNumSchemaTuple() != 0 ){ + Map<String, org.openapi4j.parser.model.v3.Schema> schemaMap = new HashMap<>(); + for( SchemaTuple t : componentsObject.getSchemaTuples() ){ + if(!t.getSchemaObject().getRef().isEmpty()){ + org.openapi4j.parser.model.v3.Schema schema=new org.openapi4j.parser.model.v3.Schema(); + schema.setRef(t.getSchemaObject().getRef()); + schemaMap.put(t.getKey(),schema); } else - schemas.put(((SchemaObjectTuple)t).getName(), SchemaObject.composeSchema(((SchemaObjectTuple)t).getSchemaObject())); + schemaMap.put(t.getKey(),SchemaObject.composeSchema(t.getSchemaObject())); } - components.setSchemas(schemas); + components.setSchemas(schemaMap); } - if( componentsObject.getNumResponsesTuple() != 0 ){ - Map<String, Response> responses = new HashMap<>(); - for( ResponsesTuple t : componentsObject.getResponsesTuples() ){ - if( t instanceof ResponseReferenceTuple ){ + if( componentsObject.getNumResponseTuple() != 0 ){ + Map<String, Response> responseMap = new HashMap<>(); + for( ResponseTuple t : componentsObject.getResponseTuples() ){ + if( !t.getResponseObject().getRef().isEmpty() ){ Response response = new Response(); - response.setRef(((ResponseReferenceTuple) t).getRef()); - responses.put(((ResponseReferenceTuple) t).getName(), response); + response.setRef(t.getResponseObject().getRef()); + responseMap.put(t.getKey(), response); } else - responses.put(((ResponseObjectTuple)t).getName(), ResponseObject.composeResponse(((ResponseObjectTuple)t).getResponseObject())); + responseMap.put(t.getKey(), ResponseObject.composeResponse(t.getResponseObject())); } - components.setResponses(responses); + components.setResponses(responseMap); } if( componentsObject.getNumParameterTuple() != 0 ){ - Map<String, Parameter> parameters = new HashMap<>(); + Map<String, Parameter> parameterMap = new HashMap<>(); for( ParameterTuple t : componentsObject.getParameterTuples() ){ - if( t instanceof ParameterReferenceTuple ){ + if( !t.getParameterObject().getRef().isEmpty() ){ Parameter parameter = new Parameter(); - parameter.setRef(((ParameterReferenceTuple) t).getRef()); - parameters.put(((ParameterReferenceTuple) t).getName(), parameter); + parameter.setRef(t.getParameterObject().getRef()); + parameterMap.put(t.getKey(), parameter); } else - parameters.put(((ParameterObjectTuple)t).getName(), ParameterObject.composeParameter(((ParameterObjectTuple)t).getParameterObject())); + parameterMap.put(t.getKey(), ParameterObject.composeParameter(t.getParameterObject())); } - components.setParameters(parameters); + components.setParameters(parameterMap); } - if( componentsObject.getNumExamplesTuple() != 0 ){ - Map<String, Example> examples = new HashMap<>(); - for( ExamplesTuple t : componentsObject.getExamplesTuples() ) - examples.put(((ExampleObjectTuple)t).getName(), ExampleObject.composeExample(((ExampleObjectTuple)t).getExampleObject())); - components.setExamples(examples); + if( componentsObject.getNumExampleTuple() != 0 ){ + Map<String, Example> exampleMap = new HashMap<>(); + for( ExampleTuple t : componentsObject.getExampleTuples() ) + exampleMap.put(t.getKey(), ExampleObject.composeExample(t.getExampleObject())); + components.setExamples(exampleMap); } - if( componentsObject.getNumRequestBodiesTuple() != 0 ){ - Map<String, org.openapi4j.parser.model.v3.RequestBody> requestBodies = new HashMap<>(); - for( RequestBodiesTuple t : componentsObject.getRequestBodiesTuples() ){ - if( t instanceof RequestBodyReferenceTuple ){ - org.openapi4j.parser.model.v3.RequestBody requestBody = new org.openapi4j.parser.model.v3.RequestBody(); - requestBody.setRef(((RequestBodyReferenceTuple) t).getRef()); - requestBodies.put(((RequestBodyReferenceTuple) t).getName(), requestBody); + if( componentsObject.getNumRequestBodyTuple() != 0 ){ + Map<String, RequestBody> requestBodyMap = new HashMap<>(); + for( RequestBodyTuple t : componentsObject.getRequestBodyTuples() ){ + if( !t.getRequestBodyObject().getRef().isEmpty() ){ + RequestBody requestBody = new RequestBody(); + requestBody.setRef(t.getRequestBodyObject().getRef()); + requestBodyMap.put(t.getKey(), requestBody); } else - requestBodies.put(((RequestBodyObjectTuple)t).getName(), RequestBodyObject.composeRequestBody(((RequestBodyObjectTuple)t).getRequestBodyObject())); + requestBodyMap.put(t.getKey(), RequestBodyObject.composeRequestBody(t.getRequestBodyObject())); } - components.setRequestBodies(requestBodies); + components.setRequestBodies(requestBodyMap); } - if( componentsObject.getNumHeadersTuple() != 0 ){ - Map<String, Header> headers = new HashMap<>(); - for( HeadersTuple t : componentsObject.getHeadersTuples() ){ - if( t instanceof HeaderReferenceTuple ){ + if( componentsObject.getNumHeaderTuple() != 0 ){ + Map<String, Header> headerMap = new HashMap<>(); + for( HeaderTuple t : componentsObject.getHeaderTuples() ){ + if( !t.getHeaderObject().getRef().isEmpty() ){ Header header = new Header(); - header.setRef(((HeaderReferenceTuple) t).getRef()); - headers.put(((HeaderReferenceTuple) t).getName(), header); + header.setRef(t.getHeaderObject().getRef()); + headerMap.put(t.getKey(), header); } else - headers.put(((HeaderObjectTuple)t).getName(), HeaderObject.composeHeader(((HeaderObjectTuple)t).getHeaderObject())); + headerMap.put(t.getKey(), HeaderObject.composeHeader(t.getHeaderObject())); } - components.setHeaders(headers); + components.setHeaders(headerMap); } - if( componentsObject.getNumSecuritySchemesTuple() != 0 ){ - Map<String, SecurityScheme> securitySchemes = new HashMap<>(); - for( SecuritySchemesTuple t : componentsObject.getSecuritySchemesTuples() ){ - if( t instanceof SecuritySchemeReferenceTuple ){ + if( componentsObject.getNumSecuritySchemeTuple() != 0 ){ + Map<String, SecurityScheme> securitySchemeMap = new HashMap<>(); + for( SecuritySchemeTuple t : componentsObject.getSecuritySchemeTuples() ){ + if( !t.getSecuritySchemeObject().getRef().isEmpty() ){ SecurityScheme securityScheme = new SecurityScheme(); - securityScheme.setRef(((SecuritySchemeReferenceTuple) t).getRef()); - securitySchemes.put(((SecuritySchemeReferenceTuple) t).getName(), securityScheme); + securityScheme.setRef(t.getSecuritySchemeObject().getRef()); + securitySchemeMap.put(t.getKey(), securityScheme); } else - securitySchemes.put(((SecuritySchemeObjectTuple)t).getName(), SecuritySchemeObject.composeSecurityScheme(((SecuritySchemeObjectTuple)t).getSecuritySchemeObject())); + securitySchemeMap.put(t.getKey(), SecuritySchemeObject.composeSecurityScheme(t.getSecuritySchemeObject())); } - components.setSecuritySchemes(securitySchemes); + components.setSecuritySchemes(securitySchemeMap); } - if( componentsObject.getNumLinksTuple() != 0 ){ - Map<String, Link> links = new HashMap<>(); - for( LinksTuple t : componentsObject.getLinksTuples() ){ - if( t instanceof LinkReferenceTuple ){ + if( componentsObject.getNumLinkTuple() != 0 ){ + Map<String, Link> linkMap = new HashMap<>(); + for( LinkTuple t : componentsObject.getLinkTuples() ){ + if( !t.getLinkObject().getRef().isEmpty() ){ Link link = new Link(); - link.setRef(((LinkReferenceTuple) t).getRef()); - links.put(((LinkReferenceTuple) t).getName(), link); + link.setRef(t.getLinkObject().getRef()); + linkMap.put(t.getKey(), link); } else - links.put(((LinkObjectTuple)t).getName(), LinkObject.composeLink(((LinkObjectTuple)t).getLinkObject())); + linkMap.put(t.getKey(), LinkObject.composeLink(t.getLinkObject())); } - components.setLinks(links); + components.setLinks(linkMap); } - if( componentsObject.getNumCallbacksTuple() != 0 ){ - Map<String, Callback> callbacks = new HashMap<>(); - for( CallbacksTuple t : componentsObject.getCallbacksTuples() ){ - if( t instanceof CallbackReferenceTuple ){ + if( componentsObject.getNumCallbackTuple() != 0 ){ + Map<String, Callback> callbackMap = new HashMap<>(); + for( CallbackTuple t : componentsObject.getCallbackTuples() ){ + if( !t.getCallbackObject().getRef().isEmpty() ){ Callback callback = new Callback(); - callback.setRef(((CallbackReferenceTuple) t).getRef()); - callbacks.put(((CallbackReferenceTuple) t).getName(), callback); + callback.setRef(t.getCallbackObject().getRef()); + callbackMap.put(t.getKey(), callback); } else - callbacks.put(((CallbackObjectTuple)t).getName(), CallbackObject.composeCallback(((CallbackObjectTuple)t).getCallbackObject())); + callbackMap.put(t.getKey(), CallbackObject.composeCallback(t.getCallbackObject())); } - components.setCallbacks(callbacks); + components.setCallbacks(callbackMap); } return components; } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:103 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:109 */ public static ComponentsObject parseComponents(Components components){ ComponentsObject componentsObject = new ComponentsObject(); if( components.getSchemas() != null ){ - JastAddList<SchemasTuple> schemasTuples = new JastAddList<>(); for( String key : components.getSchemas().keySet() ){ + SchemaTuple schemaTuple = new SchemaTuple(); if( components.getSchema(key).isRef() ){ - SchemaReferenceTuple schema = new SchemaReferenceTuple(); - schema.setName(key); - schema.setRef(components.getSchema(key).getRef()); - schemasTuples.add(schema); + SchemaObject schemaObject = new SchemaObject(); + schemaObject.setRef(components.getSchema(key).getRef()); + schemaTuple.setKey(key); + schemaTuple.setSchemaObject(schemaObject); + componentsObject.addSchemaTuple(schemaTuple); } - else { - SchemaObjectTuple schema = new SchemaObjectTuple(); - schema.setName(key); - schema.setSchemaObject(SchemaObject.parseSchema(components.getSchema(key))); - schemasTuples.add(schema); + else{ + schemaTuple.setKey(key); + schemaTuple.setSchemaObject(SchemaObject.parseSchema(components.getSchema(key))); + componentsObject.addSchemaTuple(schemaTuple); } } - componentsObject.setSchemasTupleList(schemasTuples); } if( components.getResponses() != null ){ - JastAddList<ResponsesTuple> responsesTuples = new JastAddList<>(); for( String key : components.getResponses().keySet() ){ + ResponseTuple responseTuple = new ResponseTuple(); if( components.getResponse(key).isRef() ){ - ResponseReferenceTuple response = new ResponseReferenceTuple(); - response.setName(key); - response.setRef(components.getResponse(key).getRef()); - responsesTuples.add(response); + ResponseObject responseObject = new ResponseObject(); + responseObject.setRef(components.getResponse(key).getRef()); + responseTuple.setKey(key); + responseTuple.setResponseObject(responseObject); + componentsObject.addResponseTuple(responseTuple); } - else { - ResponseObjectTuple response = new ResponseObjectTuple(); - response.setName(key); - response.setResponseObject(ResponseObject.parseResponse(components.getResponse(key))); - responsesTuples.add(response); + else{ + responseTuple.setKey(key); + responseTuple.setResponseObject(ResponseObject.parseResponse(components.getResponse(key))); + componentsObject.addResponseTuple(responseTuple); } } - componentsObject.setResponsesTupleList(responsesTuples); } if( components.getParameters() != null ){ - JastAddList<ParameterTuple> parameterTuples = new JastAddList<>(); for( String key : components.getParameters().keySet() ){ + ParameterTuple parameterTuple = new ParameterTuple(); if( components.getParameter(key).isRef() ){ - ParameterReferenceTuple parameter = new ParameterReferenceTuple(); - parameter.setName(key); - parameter.setRef(components.getParameter(key).getRef()); - parameterTuples.add(parameter); + ParameterObject parameterObject = new ParameterObject(); + parameterObject.setRef(components.getParameter(key).getRef()); + parameterTuple.setKey(key); + parameterTuple.setParameterObject(parameterObject); + componentsObject.addParameterTuple(parameterTuple); } - else { - ParameterObjectTuple parameter = new ParameterObjectTuple(); - parameter.setName(key); - parameter.setParameterObject(ParameterObject.parseParameter(components.getParameter(key))); - parameterTuples.add(parameter); + else{ + parameterTuple.setKey(key); + parameterTuple.setParameterObject(ParameterObject.parseParameter(components.getParameter(key))); + componentsObject.addParameterTuple(parameterTuple); } } - componentsObject.setParameterTupleList(parameterTuples); } if( components.getExamples() != null ){ - JastAddList<ExamplesTuple> examplesTuples = new JastAddList<>(); for( String key : components.getExamples().keySet() ){ - ExampleObjectTuple exampleObjectTuple = new ExampleObjectTuple(); - exampleObjectTuple.setName( key ); - exampleObjectTuple.setExampleObject( ExampleObject.parseExample(components.getExample(key)) ); - examplesTuples.add(exampleObjectTuple); + ExampleTuple exampleTuple = new ExampleTuple(); + ExampleObject exampleObject = new ExampleObject(); + exampleTuple.setKey(key); + exampleTuple.setExampleObject(ExampleObject.parseExample(components.getExample(key))); + componentsObject.addExampleTuple(exampleTuple); } - componentsObject.setExamplesTupleList(examplesTuples); } if( components.getRequestBodies() != null ){ - JastAddList<RequestBodiesTuple> requestBodiesTuples = new JastAddList<>(); for( String key : components.getRequestBodies().keySet() ){ + RequestBodyTuple requestBodyTuple = new RequestBodyTuple(); if( components.getRequestBody(key).isRef() ){ - RequestBodyReferenceTuple requestBody = new RequestBodyReferenceTuple(); - requestBody.setName(key); - requestBody.setRef(components.getRequestBody(key).getRef()); - requestBodiesTuples.add(requestBody); + RequestBodyObject requestBodyObject = new RequestBodyObject(); + requestBodyObject.setRef(components.getRequestBody(key).getRef()); + requestBodyTuple.setKey(key); + requestBodyTuple.setRequestBodyObject(requestBodyObject); + componentsObject.addRequestBodyTuple(requestBodyTuple); } - else { - RequestBodyObjectTuple requestBody = new RequestBodyObjectTuple(); - requestBody.setName(key); - requestBody.setRequestBodyObject(RequestBodyObject.parseRequestBody(components.getRequestBody(key))); - requestBodiesTuples.add(requestBody); + else{ + requestBodyTuple.setKey(key); + requestBodyTuple.setRequestBodyObject(RequestBodyObject.parseRequestBody(components.getRequestBody(key))); + componentsObject.addRequestBodyTuple(requestBodyTuple); } } - componentsObject.setRequestBodiesTupleList(requestBodiesTuples); } if( components.getHeaders() != null ){ - JastAddList<HeadersTuple> headersTuples = new JastAddList<>(); for( String key : components.getHeaders().keySet() ){ + HeaderTuple headerTuple = new HeaderTuple(); if( components.getHeader(key).isRef() ){ - HeaderReferenceTuple header = new HeaderReferenceTuple(); - header.setName(key); - header.setRef(components.getHeader(key).getRef()); - headersTuples.add(header); + HeaderObject headerObject = new HeaderObject(); + headerObject.setRef(components.getHeader(key).getRef()); + headerTuple.setKey(key); + headerTuple.setHeaderObject(headerObject); + componentsObject.addHeaderTuple(headerTuple); } - else { - HeaderObjectTuple header = new HeaderObjectTuple(); - header.setName(key); - header.setHeaderObject(HeaderObject.parseHeader(components.getHeader(key))); - headersTuples.add(header); + else{ + headerTuple.setKey(key); + headerTuple.setHeaderObject(HeaderObject.parseHeader(components.getHeader(key))); + componentsObject.addHeaderTuple(headerTuple); } } - componentsObject.setHeadersTupleList(headersTuples); } if( components.getSecuritySchemes() != null ){ - JastAddList<SecuritySchemesTuple> securitySchemesTuples = new JastAddList<>(); for( String key : components.getSecuritySchemes().keySet() ){ + SecuritySchemeTuple securitySchemeTuple = new SecuritySchemeTuple(); if( components.getSecurityScheme(key).isRef() ){ - SecuritySchemeReferenceTuple securityScheme = new SecuritySchemeReferenceTuple(); - securityScheme.setName(key); - securityScheme.setRef(components.getSecurityScheme(key).getRef()); - securitySchemesTuples.add(securityScheme); + SecuritySchemeObject securitySchemeObject = new SecuritySchemeObject(); + securitySchemeObject.setRef(components.getSecurityScheme(key).getRef()); + securitySchemeTuple.setKey(key); + securitySchemeTuple.setSecuritySchemeObject(securitySchemeObject); + componentsObject.addSecuritySchemeTuple(securitySchemeTuple); } - else { - SecuritySchemeObjectTuple securityScheme = new SecuritySchemeObjectTuple(); - securityScheme.setName(key); - securityScheme.setSecuritySchemeObject(SecuritySchemeObject.parseSecurityScheme(components.getSecurityScheme(key))); - securitySchemesTuples.add(securityScheme); + else{ + securitySchemeTuple.setKey(key); + securitySchemeTuple.setSecuritySchemeObject(SecuritySchemeObject.parseSecurityScheme(components.getSecurityScheme(key))); + componentsObject.addSecuritySchemeTuple(securitySchemeTuple); } } - componentsObject.setSecuritySchemesTupleList(securitySchemesTuples); } if( components.getLinks() != null ){ - JastAddList<LinksTuple> linksTuples = new JastAddList<>(); for( String key : components.getLinks().keySet() ){ + LinkTuple linkTuple = new LinkTuple(); if( components.getLink(key).isRef() ){ - LinkReferenceTuple link = new LinkReferenceTuple(); - link.setName(key); - link.setRef(components.getLink(key).getRef()); - linksTuples.add(link); + LinkObject linkObject = new LinkObject(); + linkObject.setRef(components.getLink(key).getRef()); + linkTuple.setKey(key); + linkTuple.setLinkObject(linkObject); + componentsObject.addLinkTuple(linkTuple); } - else { - LinkObjectTuple link = new LinkObjectTuple(); - link.setName(key); - link.setLinkObject(LinkObject.parseLink(components.getLink(key))); - linksTuples.add(link); + else{ + linkTuple.setKey(key); + linkTuple.setLinkObject(LinkObject.parseLink(components.getLink(key))); + componentsObject.addLinkTuple(linkTuple); } } - componentsObject.setLinksTupleList(linksTuples); } if( components.getCallbacks() != null ){ - JastAddList<CallbacksTuple> callbacksTuples = new JastAddList<>(); for( String key : components.getCallbacks().keySet() ){ + CallbackTuple callbackTuple = new CallbackTuple(); if( components.getCallback(key).isRef() ){ - CallbackReferenceTuple callback = new CallbackReferenceTuple(); - callback.setName(key); - callback.setRef(components.getLink(key).getRef()); - callbacksTuples.add(callback); + CallbackObject callbackObject = new CallbackObject(); + callbackObject.setRef(components.getCallback(key).getRef()); + callbackTuple.setKey(key); + callbackTuple.setCallbackObject(callbackObject); + componentsObject.addCallbackTuple(callbackTuple); } - else { - CallbackObjectTuple callback = new CallbackObjectTuple(); - callback.setName(key); - callback.setCallbackObject(CallbackObject.parseCallback(components.getCallback(key))); - callbacksTuples.add(callback); + else{ + callbackTuple.setKey(key); + callbackTuple.setCallbackObject(CallbackObject.parseCallback(components.getCallback(key))); + componentsObject.addCallbackTuple(callbackTuple); } } - componentsObject.setCallbacksTupleList(callbacksTuples); } return componentsObject; @@ -328,11 +320,11 @@ public class ComponentsObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:22 */ @ASTNodeAnnotation.Constructor( - name = {"SchemasTuple", "ResponsesTuple", "ParameterTuple", "ExamplesTuple", "RequestBodiesTuple", "HeadersTuple", "SecuritySchemesTuple", "LinksTuple", "CallbacksTuple"}, - type = {"JastAddList<SchemasTuple>", "JastAddList<ResponsesTuple>", "JastAddList<ParameterTuple>", "JastAddList<ExamplesTuple>", "JastAddList<RequestBodiesTuple>", "JastAddList<HeadersTuple>", "JastAddList<SecuritySchemesTuple>", "JastAddList<LinksTuple>", "JastAddList<CallbacksTuple>"}, + name = {"SchemaTuple", "ResponseTuple", "ParameterTuple", "ExampleTuple", "RequestBodyTuple", "HeaderTuple", "SecuritySchemeTuple", "LinkTuple", "CallbackTuple"}, + type = {"JastAddList<SchemaTuple>", "JastAddList<ResponseTuple>", "JastAddList<ParameterTuple>", "JastAddList<ExampleTuple>", "JastAddList<RequestBodyTuple>", "JastAddList<HeaderTuple>", "JastAddList<SecuritySchemeTuple>", "JastAddList<LinkTuple>", "JastAddList<CallbackTuple>"}, kind = {"List", "List", "List", "List", "List", "List", "List", "List", "List"} ) - public ComponentsObject(JastAddList<SchemasTuple> p0, JastAddList<ResponsesTuple> p1, JastAddList<ParameterTuple> p2, JastAddList<ExamplesTuple> p3, JastAddList<RequestBodiesTuple> p4, JastAddList<HeadersTuple> p5, JastAddList<SecuritySchemesTuple> p6, JastAddList<LinksTuple> p7, JastAddList<CallbacksTuple> p8) { + public ComponentsObject(JastAddList<SchemaTuple> p0, JastAddList<ResponseTuple> p1, JastAddList<ParameterTuple> p2, JastAddList<ExampleTuple> p3, JastAddList<RequestBodyTuple> p4, JastAddList<HeaderTuple> p5, JastAddList<SecuritySchemeTuple> p6, JastAddList<LinkTuple> p7, JastAddList<CallbackTuple> p8) { setChild(p0, 0); setChild(p1, 1); setChild(p2, 2); @@ -450,224 +442,224 @@ public class ComponentsObject extends ASTNode<ASTNode> implements Cloneable { return super.is$Equal(node); } /** - * Replaces the SchemasTuple list. - * @param list The new list node to be used as the SchemasTuple list. + * Replaces the SchemaTuple list. + * @param list The new list node to be used as the SchemaTuple list. * @apilevel high-level */ - public void setSchemasTupleList(JastAddList<SchemasTuple> list) { + public void setSchemaTupleList(JastAddList<SchemaTuple> list) { setChild(list, 0); } /** - * Retrieves the number of children in the SchemasTuple list. - * @return Number of children in the SchemasTuple list. + * Retrieves the number of children in the SchemaTuple list. + * @return Number of children in the SchemaTuple list. * @apilevel high-level */ - public int getNumSchemasTuple() { - return getSchemasTupleList().getNumChild(); + public int getNumSchemaTuple() { + return getSchemaTupleList().getNumChild(); } /** - * Retrieves the number of children in the SchemasTuple list. + * Retrieves the number of children in the SchemaTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the SchemasTuple list. + * @return Number of children in the SchemaTuple list. * @apilevel low-level */ - public int getNumSchemasTupleNoTransform() { - return getSchemasTupleListNoTransform().getNumChildNoTransform(); + public int getNumSchemaTupleNoTransform() { + return getSchemaTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the SchemasTuple list. + * Retrieves the element at index {@code i} in the SchemaTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the SchemasTuple list. + * @return The element at position {@code i} in the SchemaTuple list. * @apilevel high-level */ - public SchemasTuple getSchemasTuple(int i) { - return (SchemasTuple) getSchemasTupleList().getChild(i); + public SchemaTuple getSchemaTuple(int i) { + return (SchemaTuple) getSchemaTupleList().getChild(i); } /** - * Check whether the SchemasTuple list has any children. + * Check whether the SchemaTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasSchemasTuple() { - return getSchemasTupleList().getNumChild() != 0; + public boolean hasSchemaTuple() { + return getSchemaTupleList().getNumChild() != 0; } /** - * Append an element to the SchemasTuple list. - * @param node The element to append to the SchemasTuple list. + * Append an element to the SchemaTuple list. + * @param node The element to append to the SchemaTuple list. * @apilevel high-level */ - public void addSchemasTuple(SchemasTuple node) { - JastAddList<SchemasTuple> list = (parent == null) ? getSchemasTupleListNoTransform() : getSchemasTupleList(); + public void addSchemaTuple(SchemaTuple node) { + JastAddList<SchemaTuple> list = (parent == null) ? getSchemaTupleListNoTransform() : getSchemaTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addSchemasTupleNoTransform(SchemasTuple node) { - JastAddList<SchemasTuple> list = getSchemasTupleListNoTransform(); + public void addSchemaTupleNoTransform(SchemaTuple node) { + JastAddList<SchemaTuple> list = getSchemaTupleListNoTransform(); list.addChild(node); } /** - * Replaces the SchemasTuple list element at index {@code i} with the new node {@code node}. + * Replaces the SchemaTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setSchemasTuple(SchemasTuple node, int i) { - JastAddList<SchemasTuple> list = getSchemasTupleList(); + public void setSchemaTuple(SchemaTuple node, int i) { + JastAddList<SchemaTuple> list = getSchemaTupleList(); list.setChild(node, i); } /** - * Retrieves the SchemasTuple list. - * @return The node representing the SchemasTuple list. + * Retrieves the SchemaTuple list. + * @return The node representing the SchemaTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="SchemasTuple") - public JastAddList<SchemasTuple> getSchemasTupleList() { - JastAddList<SchemasTuple> list = (JastAddList<SchemasTuple>) getChild(0); + @ASTNodeAnnotation.ListChild(name="SchemaTuple") + public JastAddList<SchemaTuple> getSchemaTupleList() { + JastAddList<SchemaTuple> list = (JastAddList<SchemaTuple>) getChild(0); return list; } /** - * Retrieves the SchemasTuple list. + * Retrieves the SchemaTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SchemasTuple list. + * @return The node representing the SchemaTuple list. * @apilevel low-level */ - public JastAddList<SchemasTuple> getSchemasTupleListNoTransform() { - return (JastAddList<SchemasTuple>) getChildNoTransform(0); + public JastAddList<SchemaTuple> getSchemaTupleListNoTransform() { + return (JastAddList<SchemaTuple>) getChildNoTransform(0); } /** - * @return the element at index {@code i} in the SchemasTuple list without + * @return the element at index {@code i} in the SchemaTuple list without * triggering rewrites. */ - public SchemasTuple getSchemasTupleNoTransform(int i) { - return (SchemasTuple) getSchemasTupleListNoTransform().getChildNoTransform(i); + public SchemaTuple getSchemaTupleNoTransform(int i) { + return (SchemaTuple) getSchemaTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the SchemasTuple list. - * @return The node representing the SchemasTuple list. + * Retrieves the SchemaTuple list. + * @return The node representing the SchemaTuple list. * @apilevel high-level */ - public JastAddList<SchemasTuple> getSchemasTuples() { - return getSchemasTupleList(); + public JastAddList<SchemaTuple> getSchemaTuples() { + return getSchemaTupleList(); } /** - * Retrieves the SchemasTuple list. + * Retrieves the SchemaTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SchemasTuple list. + * @return The node representing the SchemaTuple list. * @apilevel low-level */ - public JastAddList<SchemasTuple> getSchemasTuplesNoTransform() { - return getSchemasTupleListNoTransform(); + public JastAddList<SchemaTuple> getSchemaTuplesNoTransform() { + return getSchemaTupleListNoTransform(); } /** - * Replaces the ResponsesTuple list. - * @param list The new list node to be used as the ResponsesTuple list. + * Replaces the ResponseTuple list. + * @param list The new list node to be used as the ResponseTuple list. * @apilevel high-level */ - public void setResponsesTupleList(JastAddList<ResponsesTuple> list) { + public void setResponseTupleList(JastAddList<ResponseTuple> list) { setChild(list, 1); } /** - * Retrieves the number of children in the ResponsesTuple list. - * @return Number of children in the ResponsesTuple list. + * Retrieves the number of children in the ResponseTuple list. + * @return Number of children in the ResponseTuple list. * @apilevel high-level */ - public int getNumResponsesTuple() { - return getResponsesTupleList().getNumChild(); + public int getNumResponseTuple() { + return getResponseTupleList().getNumChild(); } /** - * Retrieves the number of children in the ResponsesTuple list. + * Retrieves the number of children in the ResponseTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the ResponsesTuple list. + * @return Number of children in the ResponseTuple list. * @apilevel low-level */ - public int getNumResponsesTupleNoTransform() { - return getResponsesTupleListNoTransform().getNumChildNoTransform(); + public int getNumResponseTupleNoTransform() { + return getResponseTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the ResponsesTuple list. + * Retrieves the element at index {@code i} in the ResponseTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the ResponsesTuple list. + * @return The element at position {@code i} in the ResponseTuple list. * @apilevel high-level */ - public ResponsesTuple getResponsesTuple(int i) { - return (ResponsesTuple) getResponsesTupleList().getChild(i); + public ResponseTuple getResponseTuple(int i) { + return (ResponseTuple) getResponseTupleList().getChild(i); } /** - * Check whether the ResponsesTuple list has any children. + * Check whether the ResponseTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasResponsesTuple() { - return getResponsesTupleList().getNumChild() != 0; + public boolean hasResponseTuple() { + return getResponseTupleList().getNumChild() != 0; } /** - * Append an element to the ResponsesTuple list. - * @param node The element to append to the ResponsesTuple list. + * Append an element to the ResponseTuple list. + * @param node The element to append to the ResponseTuple list. * @apilevel high-level */ - public void addResponsesTuple(ResponsesTuple node) { - JastAddList<ResponsesTuple> list = (parent == null) ? getResponsesTupleListNoTransform() : getResponsesTupleList(); + public void addResponseTuple(ResponseTuple node) { + JastAddList<ResponseTuple> list = (parent == null) ? getResponseTupleListNoTransform() : getResponseTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addResponsesTupleNoTransform(ResponsesTuple node) { - JastAddList<ResponsesTuple> list = getResponsesTupleListNoTransform(); + public void addResponseTupleNoTransform(ResponseTuple node) { + JastAddList<ResponseTuple> list = getResponseTupleListNoTransform(); list.addChild(node); } /** - * Replaces the ResponsesTuple list element at index {@code i} with the new node {@code node}. + * Replaces the ResponseTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setResponsesTuple(ResponsesTuple node, int i) { - JastAddList<ResponsesTuple> list = getResponsesTupleList(); + public void setResponseTuple(ResponseTuple node, int i) { + JastAddList<ResponseTuple> list = getResponseTupleList(); list.setChild(node, i); } /** - * Retrieves the ResponsesTuple list. - * @return The node representing the ResponsesTuple list. + * Retrieves the ResponseTuple list. + * @return The node representing the ResponseTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="ResponsesTuple") - public JastAddList<ResponsesTuple> getResponsesTupleList() { - JastAddList<ResponsesTuple> list = (JastAddList<ResponsesTuple>) getChild(1); + @ASTNodeAnnotation.ListChild(name="ResponseTuple") + public JastAddList<ResponseTuple> getResponseTupleList() { + JastAddList<ResponseTuple> list = (JastAddList<ResponseTuple>) getChild(1); return list; } /** - * Retrieves the ResponsesTuple list. + * Retrieves the ResponseTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ResponsesTuple list. + * @return The node representing the ResponseTuple list. * @apilevel low-level */ - public JastAddList<ResponsesTuple> getResponsesTupleListNoTransform() { - return (JastAddList<ResponsesTuple>) getChildNoTransform(1); + public JastAddList<ResponseTuple> getResponseTupleListNoTransform() { + return (JastAddList<ResponseTuple>) getChildNoTransform(1); } /** - * @return the element at index {@code i} in the ResponsesTuple list without + * @return the element at index {@code i} in the ResponseTuple list without * triggering rewrites. */ - public ResponsesTuple getResponsesTupleNoTransform(int i) { - return (ResponsesTuple) getResponsesTupleListNoTransform().getChildNoTransform(i); + public ResponseTuple getResponseTupleNoTransform(int i) { + return (ResponseTuple) getResponseTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the ResponsesTuple list. - * @return The node representing the ResponsesTuple list. + * Retrieves the ResponseTuple list. + * @return The node representing the ResponseTuple list. * @apilevel high-level */ - public JastAddList<ResponsesTuple> getResponsesTuples() { - return getResponsesTupleList(); + public JastAddList<ResponseTuple> getResponseTuples() { + return getResponseTupleList(); } /** - * Retrieves the ResponsesTuple list. + * Retrieves the ResponseTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ResponsesTuple list. + * @return The node representing the ResponseTuple list. * @apilevel low-level */ - public JastAddList<ResponsesTuple> getResponsesTuplesNoTransform() { - return getResponsesTupleListNoTransform(); + public JastAddList<ResponseTuple> getResponseTuplesNoTransform() { + return getResponseTupleListNoTransform(); } /** * Replaces the ParameterTuple list. @@ -780,664 +772,664 @@ public class ComponentsObject extends ASTNode<ASTNode> implements Cloneable { return getParameterTupleListNoTransform(); } /** - * Replaces the ExamplesTuple list. - * @param list The new list node to be used as the ExamplesTuple list. + * Replaces the ExampleTuple list. + * @param list The new list node to be used as the ExampleTuple list. * @apilevel high-level */ - public void setExamplesTupleList(JastAddList<ExamplesTuple> list) { + public void setExampleTupleList(JastAddList<ExampleTuple> list) { setChild(list, 3); } /** - * Retrieves the number of children in the ExamplesTuple list. - * @return Number of children in the ExamplesTuple list. + * Retrieves the number of children in the ExampleTuple list. + * @return Number of children in the ExampleTuple list. * @apilevel high-level */ - public int getNumExamplesTuple() { - return getExamplesTupleList().getNumChild(); + public int getNumExampleTuple() { + return getExampleTupleList().getNumChild(); } /** - * Retrieves the number of children in the ExamplesTuple list. + * Retrieves the number of children in the ExampleTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the ExamplesTuple list. + * @return Number of children in the ExampleTuple list. * @apilevel low-level */ - public int getNumExamplesTupleNoTransform() { - return getExamplesTupleListNoTransform().getNumChildNoTransform(); + public int getNumExampleTupleNoTransform() { + return getExampleTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the ExamplesTuple list. + * Retrieves the element at index {@code i} in the ExampleTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the ExamplesTuple list. + * @return The element at position {@code i} in the ExampleTuple list. * @apilevel high-level */ - public ExamplesTuple getExamplesTuple(int i) { - return (ExamplesTuple) getExamplesTupleList().getChild(i); + public ExampleTuple getExampleTuple(int i) { + return (ExampleTuple) getExampleTupleList().getChild(i); } /** - * Check whether the ExamplesTuple list has any children. + * Check whether the ExampleTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasExamplesTuple() { - return getExamplesTupleList().getNumChild() != 0; + public boolean hasExampleTuple() { + return getExampleTupleList().getNumChild() != 0; } /** - * Append an element to the ExamplesTuple list. - * @param node The element to append to the ExamplesTuple list. + * Append an element to the ExampleTuple list. + * @param node The element to append to the ExampleTuple list. * @apilevel high-level */ - public void addExamplesTuple(ExamplesTuple node) { - JastAddList<ExamplesTuple> list = (parent == null) ? getExamplesTupleListNoTransform() : getExamplesTupleList(); + public void addExampleTuple(ExampleTuple node) { + JastAddList<ExampleTuple> list = (parent == null) ? getExampleTupleListNoTransform() : getExampleTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addExamplesTupleNoTransform(ExamplesTuple node) { - JastAddList<ExamplesTuple> list = getExamplesTupleListNoTransform(); + public void addExampleTupleNoTransform(ExampleTuple node) { + JastAddList<ExampleTuple> list = getExampleTupleListNoTransform(); list.addChild(node); } /** - * Replaces the ExamplesTuple list element at index {@code i} with the new node {@code node}. + * Replaces the ExampleTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setExamplesTuple(ExamplesTuple node, int i) { - JastAddList<ExamplesTuple> list = getExamplesTupleList(); + public void setExampleTuple(ExampleTuple node, int i) { + JastAddList<ExampleTuple> list = getExampleTupleList(); list.setChild(node, i); } /** - * Retrieves the ExamplesTuple list. - * @return The node representing the ExamplesTuple list. + * Retrieves the ExampleTuple list. + * @return The node representing the ExampleTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="ExamplesTuple") - public JastAddList<ExamplesTuple> getExamplesTupleList() { - JastAddList<ExamplesTuple> list = (JastAddList<ExamplesTuple>) getChild(3); + @ASTNodeAnnotation.ListChild(name="ExampleTuple") + public JastAddList<ExampleTuple> getExampleTupleList() { + JastAddList<ExampleTuple> list = (JastAddList<ExampleTuple>) getChild(3); return list; } /** - * Retrieves the ExamplesTuple list. + * Retrieves the ExampleTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExamplesTuple list. + * @return The node representing the ExampleTuple list. * @apilevel low-level */ - public JastAddList<ExamplesTuple> getExamplesTupleListNoTransform() { - return (JastAddList<ExamplesTuple>) getChildNoTransform(3); + public JastAddList<ExampleTuple> getExampleTupleListNoTransform() { + return (JastAddList<ExampleTuple>) getChildNoTransform(3); } /** - * @return the element at index {@code i} in the ExamplesTuple list without + * @return the element at index {@code i} in the ExampleTuple list without * triggering rewrites. */ - public ExamplesTuple getExamplesTupleNoTransform(int i) { - return (ExamplesTuple) getExamplesTupleListNoTransform().getChildNoTransform(i); + public ExampleTuple getExampleTupleNoTransform(int i) { + return (ExampleTuple) getExampleTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the ExamplesTuple list. - * @return The node representing the ExamplesTuple list. + * Retrieves the ExampleTuple list. + * @return The node representing the ExampleTuple list. * @apilevel high-level */ - public JastAddList<ExamplesTuple> getExamplesTuples() { - return getExamplesTupleList(); + public JastAddList<ExampleTuple> getExampleTuples() { + return getExampleTupleList(); } /** - * Retrieves the ExamplesTuple list. + * Retrieves the ExampleTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExamplesTuple list. + * @return The node representing the ExampleTuple list. * @apilevel low-level */ - public JastAddList<ExamplesTuple> getExamplesTuplesNoTransform() { - return getExamplesTupleListNoTransform(); + public JastAddList<ExampleTuple> getExampleTuplesNoTransform() { + return getExampleTupleListNoTransform(); } /** - * Replaces the RequestBodiesTuple list. - * @param list The new list node to be used as the RequestBodiesTuple list. + * Replaces the RequestBodyTuple list. + * @param list The new list node to be used as the RequestBodyTuple list. * @apilevel high-level */ - public void setRequestBodiesTupleList(JastAddList<RequestBodiesTuple> list) { + public void setRequestBodyTupleList(JastAddList<RequestBodyTuple> list) { setChild(list, 4); } /** - * Retrieves the number of children in the RequestBodiesTuple list. - * @return Number of children in the RequestBodiesTuple list. + * Retrieves the number of children in the RequestBodyTuple list. + * @return Number of children in the RequestBodyTuple list. * @apilevel high-level */ - public int getNumRequestBodiesTuple() { - return getRequestBodiesTupleList().getNumChild(); + public int getNumRequestBodyTuple() { + return getRequestBodyTupleList().getNumChild(); } /** - * Retrieves the number of children in the RequestBodiesTuple list. + * Retrieves the number of children in the RequestBodyTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the RequestBodiesTuple list. + * @return Number of children in the RequestBodyTuple list. * @apilevel low-level */ - public int getNumRequestBodiesTupleNoTransform() { - return getRequestBodiesTupleListNoTransform().getNumChildNoTransform(); + public int getNumRequestBodyTupleNoTransform() { + return getRequestBodyTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the RequestBodiesTuple list. + * Retrieves the element at index {@code i} in the RequestBodyTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the RequestBodiesTuple list. + * @return The element at position {@code i} in the RequestBodyTuple list. * @apilevel high-level */ - public RequestBodiesTuple getRequestBodiesTuple(int i) { - return (RequestBodiesTuple) getRequestBodiesTupleList().getChild(i); + public RequestBodyTuple getRequestBodyTuple(int i) { + return (RequestBodyTuple) getRequestBodyTupleList().getChild(i); } /** - * Check whether the RequestBodiesTuple list has any children. + * Check whether the RequestBodyTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasRequestBodiesTuple() { - return getRequestBodiesTupleList().getNumChild() != 0; + public boolean hasRequestBodyTuple() { + return getRequestBodyTupleList().getNumChild() != 0; } /** - * Append an element to the RequestBodiesTuple list. - * @param node The element to append to the RequestBodiesTuple list. + * Append an element to the RequestBodyTuple list. + * @param node The element to append to the RequestBodyTuple list. * @apilevel high-level */ - public void addRequestBodiesTuple(RequestBodiesTuple node) { - JastAddList<RequestBodiesTuple> list = (parent == null) ? getRequestBodiesTupleListNoTransform() : getRequestBodiesTupleList(); + public void addRequestBodyTuple(RequestBodyTuple node) { + JastAddList<RequestBodyTuple> list = (parent == null) ? getRequestBodyTupleListNoTransform() : getRequestBodyTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addRequestBodiesTupleNoTransform(RequestBodiesTuple node) { - JastAddList<RequestBodiesTuple> list = getRequestBodiesTupleListNoTransform(); + public void addRequestBodyTupleNoTransform(RequestBodyTuple node) { + JastAddList<RequestBodyTuple> list = getRequestBodyTupleListNoTransform(); list.addChild(node); } /** - * Replaces the RequestBodiesTuple list element at index {@code i} with the new node {@code node}. + * Replaces the RequestBodyTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setRequestBodiesTuple(RequestBodiesTuple node, int i) { - JastAddList<RequestBodiesTuple> list = getRequestBodiesTupleList(); + public void setRequestBodyTuple(RequestBodyTuple node, int i) { + JastAddList<RequestBodyTuple> list = getRequestBodyTupleList(); list.setChild(node, i); } /** - * Retrieves the RequestBodiesTuple list. - * @return The node representing the RequestBodiesTuple list. + * Retrieves the RequestBodyTuple list. + * @return The node representing the RequestBodyTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="RequestBodiesTuple") - public JastAddList<RequestBodiesTuple> getRequestBodiesTupleList() { - JastAddList<RequestBodiesTuple> list = (JastAddList<RequestBodiesTuple>) getChild(4); + @ASTNodeAnnotation.ListChild(name="RequestBodyTuple") + public JastAddList<RequestBodyTuple> getRequestBodyTupleList() { + JastAddList<RequestBodyTuple> list = (JastAddList<RequestBodyTuple>) getChild(4); return list; } /** - * Retrieves the RequestBodiesTuple list. + * Retrieves the RequestBodyTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the RequestBodiesTuple list. + * @return The node representing the RequestBodyTuple list. * @apilevel low-level */ - public JastAddList<RequestBodiesTuple> getRequestBodiesTupleListNoTransform() { - return (JastAddList<RequestBodiesTuple>) getChildNoTransform(4); + public JastAddList<RequestBodyTuple> getRequestBodyTupleListNoTransform() { + return (JastAddList<RequestBodyTuple>) getChildNoTransform(4); } /** - * @return the element at index {@code i} in the RequestBodiesTuple list without + * @return the element at index {@code i} in the RequestBodyTuple list without * triggering rewrites. */ - public RequestBodiesTuple getRequestBodiesTupleNoTransform(int i) { - return (RequestBodiesTuple) getRequestBodiesTupleListNoTransform().getChildNoTransform(i); + public RequestBodyTuple getRequestBodyTupleNoTransform(int i) { + return (RequestBodyTuple) getRequestBodyTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the RequestBodiesTuple list. - * @return The node representing the RequestBodiesTuple list. + * Retrieves the RequestBodyTuple list. + * @return The node representing the RequestBodyTuple list. * @apilevel high-level */ - public JastAddList<RequestBodiesTuple> getRequestBodiesTuples() { - return getRequestBodiesTupleList(); + public JastAddList<RequestBodyTuple> getRequestBodyTuples() { + return getRequestBodyTupleList(); } /** - * Retrieves the RequestBodiesTuple list. + * Retrieves the RequestBodyTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the RequestBodiesTuple list. + * @return The node representing the RequestBodyTuple list. * @apilevel low-level */ - public JastAddList<RequestBodiesTuple> getRequestBodiesTuplesNoTransform() { - return getRequestBodiesTupleListNoTransform(); + public JastAddList<RequestBodyTuple> getRequestBodyTuplesNoTransform() { + return getRequestBodyTupleListNoTransform(); } /** - * Replaces the HeadersTuple list. - * @param list The new list node to be used as the HeadersTuple list. + * Replaces the HeaderTuple list. + * @param list The new list node to be used as the HeaderTuple list. * @apilevel high-level */ - public void setHeadersTupleList(JastAddList<HeadersTuple> list) { + public void setHeaderTupleList(JastAddList<HeaderTuple> list) { setChild(list, 5); } /** - * Retrieves the number of children in the HeadersTuple list. - * @return Number of children in the HeadersTuple list. + * Retrieves the number of children in the HeaderTuple list. + * @return Number of children in the HeaderTuple list. * @apilevel high-level */ - public int getNumHeadersTuple() { - return getHeadersTupleList().getNumChild(); + public int getNumHeaderTuple() { + return getHeaderTupleList().getNumChild(); } /** - * Retrieves the number of children in the HeadersTuple list. + * Retrieves the number of children in the HeaderTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the HeadersTuple list. + * @return Number of children in the HeaderTuple list. * @apilevel low-level */ - public int getNumHeadersTupleNoTransform() { - return getHeadersTupleListNoTransform().getNumChildNoTransform(); + public int getNumHeaderTupleNoTransform() { + return getHeaderTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the HeadersTuple list. + * Retrieves the element at index {@code i} in the HeaderTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the HeadersTuple list. + * @return The element at position {@code i} in the HeaderTuple list. * @apilevel high-level */ - public HeadersTuple getHeadersTuple(int i) { - return (HeadersTuple) getHeadersTupleList().getChild(i); + public HeaderTuple getHeaderTuple(int i) { + return (HeaderTuple) getHeaderTupleList().getChild(i); } /** - * Check whether the HeadersTuple list has any children. + * Check whether the HeaderTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasHeadersTuple() { - return getHeadersTupleList().getNumChild() != 0; + public boolean hasHeaderTuple() { + return getHeaderTupleList().getNumChild() != 0; } /** - * Append an element to the HeadersTuple list. - * @param node The element to append to the HeadersTuple list. + * Append an element to the HeaderTuple list. + * @param node The element to append to the HeaderTuple list. * @apilevel high-level */ - public void addHeadersTuple(HeadersTuple node) { - JastAddList<HeadersTuple> list = (parent == null) ? getHeadersTupleListNoTransform() : getHeadersTupleList(); + public void addHeaderTuple(HeaderTuple node) { + JastAddList<HeaderTuple> list = (parent == null) ? getHeaderTupleListNoTransform() : getHeaderTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addHeadersTupleNoTransform(HeadersTuple node) { - JastAddList<HeadersTuple> list = getHeadersTupleListNoTransform(); + public void addHeaderTupleNoTransform(HeaderTuple node) { + JastAddList<HeaderTuple> list = getHeaderTupleListNoTransform(); list.addChild(node); } /** - * Replaces the HeadersTuple list element at index {@code i} with the new node {@code node}. + * Replaces the HeaderTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setHeadersTuple(HeadersTuple node, int i) { - JastAddList<HeadersTuple> list = getHeadersTupleList(); + public void setHeaderTuple(HeaderTuple node, int i) { + JastAddList<HeaderTuple> list = getHeaderTupleList(); list.setChild(node, i); } /** - * Retrieves the HeadersTuple list. - * @return The node representing the HeadersTuple list. + * Retrieves the HeaderTuple list. + * @return The node representing the HeaderTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="HeadersTuple") - public JastAddList<HeadersTuple> getHeadersTupleList() { - JastAddList<HeadersTuple> list = (JastAddList<HeadersTuple>) getChild(5); + @ASTNodeAnnotation.ListChild(name="HeaderTuple") + public JastAddList<HeaderTuple> getHeaderTupleList() { + JastAddList<HeaderTuple> list = (JastAddList<HeaderTuple>) getChild(5); return list; } /** - * Retrieves the HeadersTuple list. + * Retrieves the HeaderTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeadersTuple list. + * @return The node representing the HeaderTuple list. * @apilevel low-level */ - public JastAddList<HeadersTuple> getHeadersTupleListNoTransform() { - return (JastAddList<HeadersTuple>) getChildNoTransform(5); + public JastAddList<HeaderTuple> getHeaderTupleListNoTransform() { + return (JastAddList<HeaderTuple>) getChildNoTransform(5); } /** - * @return the element at index {@code i} in the HeadersTuple list without + * @return the element at index {@code i} in the HeaderTuple list without * triggering rewrites. */ - public HeadersTuple getHeadersTupleNoTransform(int i) { - return (HeadersTuple) getHeadersTupleListNoTransform().getChildNoTransform(i); + public HeaderTuple getHeaderTupleNoTransform(int i) { + return (HeaderTuple) getHeaderTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the HeadersTuple list. - * @return The node representing the HeadersTuple list. + * Retrieves the HeaderTuple list. + * @return The node representing the HeaderTuple list. * @apilevel high-level */ - public JastAddList<HeadersTuple> getHeadersTuples() { - return getHeadersTupleList(); + public JastAddList<HeaderTuple> getHeaderTuples() { + return getHeaderTupleList(); } /** - * Retrieves the HeadersTuple list. + * Retrieves the HeaderTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeadersTuple list. + * @return The node representing the HeaderTuple list. * @apilevel low-level */ - public JastAddList<HeadersTuple> getHeadersTuplesNoTransform() { - return getHeadersTupleListNoTransform(); + public JastAddList<HeaderTuple> getHeaderTuplesNoTransform() { + return getHeaderTupleListNoTransform(); } /** - * Replaces the SecuritySchemesTuple list. - * @param list The new list node to be used as the SecuritySchemesTuple list. + * Replaces the SecuritySchemeTuple list. + * @param list The new list node to be used as the SecuritySchemeTuple list. * @apilevel high-level */ - public void setSecuritySchemesTupleList(JastAddList<SecuritySchemesTuple> list) { + public void setSecuritySchemeTupleList(JastAddList<SecuritySchemeTuple> list) { setChild(list, 6); } /** - * Retrieves the number of children in the SecuritySchemesTuple list. - * @return Number of children in the SecuritySchemesTuple list. + * Retrieves the number of children in the SecuritySchemeTuple list. + * @return Number of children in the SecuritySchemeTuple list. * @apilevel high-level */ - public int getNumSecuritySchemesTuple() { - return getSecuritySchemesTupleList().getNumChild(); + public int getNumSecuritySchemeTuple() { + return getSecuritySchemeTupleList().getNumChild(); } /** - * Retrieves the number of children in the SecuritySchemesTuple list. + * Retrieves the number of children in the SecuritySchemeTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the SecuritySchemesTuple list. + * @return Number of children in the SecuritySchemeTuple list. * @apilevel low-level */ - public int getNumSecuritySchemesTupleNoTransform() { - return getSecuritySchemesTupleListNoTransform().getNumChildNoTransform(); + public int getNumSecuritySchemeTupleNoTransform() { + return getSecuritySchemeTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the SecuritySchemesTuple list. + * Retrieves the element at index {@code i} in the SecuritySchemeTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the SecuritySchemesTuple list. + * @return The element at position {@code i} in the SecuritySchemeTuple list. * @apilevel high-level */ - public SecuritySchemesTuple getSecuritySchemesTuple(int i) { - return (SecuritySchemesTuple) getSecuritySchemesTupleList().getChild(i); + public SecuritySchemeTuple getSecuritySchemeTuple(int i) { + return (SecuritySchemeTuple) getSecuritySchemeTupleList().getChild(i); } /** - * Check whether the SecuritySchemesTuple list has any children. + * Check whether the SecuritySchemeTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasSecuritySchemesTuple() { - return getSecuritySchemesTupleList().getNumChild() != 0; + public boolean hasSecuritySchemeTuple() { + return getSecuritySchemeTupleList().getNumChild() != 0; } /** - * Append an element to the SecuritySchemesTuple list. - * @param node The element to append to the SecuritySchemesTuple list. + * Append an element to the SecuritySchemeTuple list. + * @param node The element to append to the SecuritySchemeTuple list. * @apilevel high-level */ - public void addSecuritySchemesTuple(SecuritySchemesTuple node) { - JastAddList<SecuritySchemesTuple> list = (parent == null) ? getSecuritySchemesTupleListNoTransform() : getSecuritySchemesTupleList(); + public void addSecuritySchemeTuple(SecuritySchemeTuple node) { + JastAddList<SecuritySchemeTuple> list = (parent == null) ? getSecuritySchemeTupleListNoTransform() : getSecuritySchemeTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addSecuritySchemesTupleNoTransform(SecuritySchemesTuple node) { - JastAddList<SecuritySchemesTuple> list = getSecuritySchemesTupleListNoTransform(); + public void addSecuritySchemeTupleNoTransform(SecuritySchemeTuple node) { + JastAddList<SecuritySchemeTuple> list = getSecuritySchemeTupleListNoTransform(); list.addChild(node); } /** - * Replaces the SecuritySchemesTuple list element at index {@code i} with the new node {@code node}. + * Replaces the SecuritySchemeTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setSecuritySchemesTuple(SecuritySchemesTuple node, int i) { - JastAddList<SecuritySchemesTuple> list = getSecuritySchemesTupleList(); + public void setSecuritySchemeTuple(SecuritySchemeTuple node, int i) { + JastAddList<SecuritySchemeTuple> list = getSecuritySchemeTupleList(); list.setChild(node, i); } /** - * Retrieves the SecuritySchemesTuple list. - * @return The node representing the SecuritySchemesTuple list. + * Retrieves the SecuritySchemeTuple list. + * @return The node representing the SecuritySchemeTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="SecuritySchemesTuple") - public JastAddList<SecuritySchemesTuple> getSecuritySchemesTupleList() { - JastAddList<SecuritySchemesTuple> list = (JastAddList<SecuritySchemesTuple>) getChild(6); + @ASTNodeAnnotation.ListChild(name="SecuritySchemeTuple") + public JastAddList<SecuritySchemeTuple> getSecuritySchemeTupleList() { + JastAddList<SecuritySchemeTuple> list = (JastAddList<SecuritySchemeTuple>) getChild(6); return list; } /** - * Retrieves the SecuritySchemesTuple list. + * Retrieves the SecuritySchemeTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SecuritySchemesTuple list. + * @return The node representing the SecuritySchemeTuple list. * @apilevel low-level */ - public JastAddList<SecuritySchemesTuple> getSecuritySchemesTupleListNoTransform() { - return (JastAddList<SecuritySchemesTuple>) getChildNoTransform(6); + public JastAddList<SecuritySchemeTuple> getSecuritySchemeTupleListNoTransform() { + return (JastAddList<SecuritySchemeTuple>) getChildNoTransform(6); } /** - * @return the element at index {@code i} in the SecuritySchemesTuple list without + * @return the element at index {@code i} in the SecuritySchemeTuple list without * triggering rewrites. */ - public SecuritySchemesTuple getSecuritySchemesTupleNoTransform(int i) { - return (SecuritySchemesTuple) getSecuritySchemesTupleListNoTransform().getChildNoTransform(i); + public SecuritySchemeTuple getSecuritySchemeTupleNoTransform(int i) { + return (SecuritySchemeTuple) getSecuritySchemeTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the SecuritySchemesTuple list. - * @return The node representing the SecuritySchemesTuple list. + * Retrieves the SecuritySchemeTuple list. + * @return The node representing the SecuritySchemeTuple list. * @apilevel high-level */ - public JastAddList<SecuritySchemesTuple> getSecuritySchemesTuples() { - return getSecuritySchemesTupleList(); + public JastAddList<SecuritySchemeTuple> getSecuritySchemeTuples() { + return getSecuritySchemeTupleList(); } /** - * Retrieves the SecuritySchemesTuple list. + * Retrieves the SecuritySchemeTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the SecuritySchemesTuple list. + * @return The node representing the SecuritySchemeTuple list. * @apilevel low-level */ - public JastAddList<SecuritySchemesTuple> getSecuritySchemesTuplesNoTransform() { - return getSecuritySchemesTupleListNoTransform(); + public JastAddList<SecuritySchemeTuple> getSecuritySchemeTuplesNoTransform() { + return getSecuritySchemeTupleListNoTransform(); } /** - * Replaces the LinksTuple list. - * @param list The new list node to be used as the LinksTuple list. + * Replaces the LinkTuple list. + * @param list The new list node to be used as the LinkTuple list. * @apilevel high-level */ - public void setLinksTupleList(JastAddList<LinksTuple> list) { + public void setLinkTupleList(JastAddList<LinkTuple> list) { setChild(list, 7); } /** - * Retrieves the number of children in the LinksTuple list. - * @return Number of children in the LinksTuple list. + * Retrieves the number of children in the LinkTuple list. + * @return Number of children in the LinkTuple list. * @apilevel high-level */ - public int getNumLinksTuple() { - return getLinksTupleList().getNumChild(); + public int getNumLinkTuple() { + return getLinkTupleList().getNumChild(); } /** - * Retrieves the number of children in the LinksTuple list. + * Retrieves the number of children in the LinkTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the LinksTuple list. + * @return Number of children in the LinkTuple list. * @apilevel low-level */ - public int getNumLinksTupleNoTransform() { - return getLinksTupleListNoTransform().getNumChildNoTransform(); + public int getNumLinkTupleNoTransform() { + return getLinkTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the LinksTuple list. + * Retrieves the element at index {@code i} in the LinkTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the LinksTuple list. + * @return The element at position {@code i} in the LinkTuple list. * @apilevel high-level */ - public LinksTuple getLinksTuple(int i) { - return (LinksTuple) getLinksTupleList().getChild(i); + public LinkTuple getLinkTuple(int i) { + return (LinkTuple) getLinkTupleList().getChild(i); } /** - * Check whether the LinksTuple list has any children. + * Check whether the LinkTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasLinksTuple() { - return getLinksTupleList().getNumChild() != 0; + public boolean hasLinkTuple() { + return getLinkTupleList().getNumChild() != 0; } /** - * Append an element to the LinksTuple list. - * @param node The element to append to the LinksTuple list. + * Append an element to the LinkTuple list. + * @param node The element to append to the LinkTuple list. * @apilevel high-level */ - public void addLinksTuple(LinksTuple node) { - JastAddList<LinksTuple> list = (parent == null) ? getLinksTupleListNoTransform() : getLinksTupleList(); + public void addLinkTuple(LinkTuple node) { + JastAddList<LinkTuple> list = (parent == null) ? getLinkTupleListNoTransform() : getLinkTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addLinksTupleNoTransform(LinksTuple node) { - JastAddList<LinksTuple> list = getLinksTupleListNoTransform(); + public void addLinkTupleNoTransform(LinkTuple node) { + JastAddList<LinkTuple> list = getLinkTupleListNoTransform(); list.addChild(node); } /** - * Replaces the LinksTuple list element at index {@code i} with the new node {@code node}. + * Replaces the LinkTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setLinksTuple(LinksTuple node, int i) { - JastAddList<LinksTuple> list = getLinksTupleList(); + public void setLinkTuple(LinkTuple node, int i) { + JastAddList<LinkTuple> list = getLinkTupleList(); list.setChild(node, i); } /** - * Retrieves the LinksTuple list. - * @return The node representing the LinksTuple list. + * Retrieves the LinkTuple list. + * @return The node representing the LinkTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="LinksTuple") - public JastAddList<LinksTuple> getLinksTupleList() { - JastAddList<LinksTuple> list = (JastAddList<LinksTuple>) getChild(7); + @ASTNodeAnnotation.ListChild(name="LinkTuple") + public JastAddList<LinkTuple> getLinkTupleList() { + JastAddList<LinkTuple> list = (JastAddList<LinkTuple>) getChild(7); return list; } /** - * Retrieves the LinksTuple list. + * Retrieves the LinkTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the LinksTuple list. + * @return The node representing the LinkTuple list. * @apilevel low-level */ - public JastAddList<LinksTuple> getLinksTupleListNoTransform() { - return (JastAddList<LinksTuple>) getChildNoTransform(7); + public JastAddList<LinkTuple> getLinkTupleListNoTransform() { + return (JastAddList<LinkTuple>) getChildNoTransform(7); } /** - * @return the element at index {@code i} in the LinksTuple list without + * @return the element at index {@code i} in the LinkTuple list without * triggering rewrites. */ - public LinksTuple getLinksTupleNoTransform(int i) { - return (LinksTuple) getLinksTupleListNoTransform().getChildNoTransform(i); + public LinkTuple getLinkTupleNoTransform(int i) { + return (LinkTuple) getLinkTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the LinksTuple list. - * @return The node representing the LinksTuple list. + * Retrieves the LinkTuple list. + * @return The node representing the LinkTuple list. * @apilevel high-level */ - public JastAddList<LinksTuple> getLinksTuples() { - return getLinksTupleList(); + public JastAddList<LinkTuple> getLinkTuples() { + return getLinkTupleList(); } /** - * Retrieves the LinksTuple list. + * Retrieves the LinkTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the LinksTuple list. + * @return The node representing the LinkTuple list. * @apilevel low-level */ - public JastAddList<LinksTuple> getLinksTuplesNoTransform() { - return getLinksTupleListNoTransform(); + public JastAddList<LinkTuple> getLinkTuplesNoTransform() { + return getLinkTupleListNoTransform(); } /** - * Replaces the CallbacksTuple list. - * @param list The new list node to be used as the CallbacksTuple list. + * Replaces the CallbackTuple list. + * @param list The new list node to be used as the CallbackTuple list. * @apilevel high-level */ - public void setCallbacksTupleList(JastAddList<CallbacksTuple> list) { + public void setCallbackTupleList(JastAddList<CallbackTuple> list) { setChild(list, 8); } /** - * Retrieves the number of children in the CallbacksTuple list. - * @return Number of children in the CallbacksTuple list. + * Retrieves the number of children in the CallbackTuple list. + * @return Number of children in the CallbackTuple list. * @apilevel high-level */ - public int getNumCallbacksTuple() { - return getCallbacksTupleList().getNumChild(); + public int getNumCallbackTuple() { + return getCallbackTupleList().getNumChild(); } /** - * Retrieves the number of children in the CallbacksTuple list. + * Retrieves the number of children in the CallbackTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the CallbacksTuple list. + * @return Number of children in the CallbackTuple list. * @apilevel low-level */ - public int getNumCallbacksTupleNoTransform() { - return getCallbacksTupleListNoTransform().getNumChildNoTransform(); + public int getNumCallbackTupleNoTransform() { + return getCallbackTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the CallbacksTuple list. + * Retrieves the element at index {@code i} in the CallbackTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the CallbacksTuple list. + * @return The element at position {@code i} in the CallbackTuple list. * @apilevel high-level */ - public CallbacksTuple getCallbacksTuple(int i) { - return (CallbacksTuple) getCallbacksTupleList().getChild(i); + public CallbackTuple getCallbackTuple(int i) { + return (CallbackTuple) getCallbackTupleList().getChild(i); } /** - * Check whether the CallbacksTuple list has any children. + * Check whether the CallbackTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasCallbacksTuple() { - return getCallbacksTupleList().getNumChild() != 0; + public boolean hasCallbackTuple() { + return getCallbackTupleList().getNumChild() != 0; } /** - * Append an element to the CallbacksTuple list. - * @param node The element to append to the CallbacksTuple list. + * Append an element to the CallbackTuple list. + * @param node The element to append to the CallbackTuple list. * @apilevel high-level */ - public void addCallbacksTuple(CallbacksTuple node) { - JastAddList<CallbacksTuple> list = (parent == null) ? getCallbacksTupleListNoTransform() : getCallbacksTupleList(); + public void addCallbackTuple(CallbackTuple node) { + JastAddList<CallbackTuple> list = (parent == null) ? getCallbackTupleListNoTransform() : getCallbackTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addCallbacksTupleNoTransform(CallbacksTuple node) { - JastAddList<CallbacksTuple> list = getCallbacksTupleListNoTransform(); + public void addCallbackTupleNoTransform(CallbackTuple node) { + JastAddList<CallbackTuple> list = getCallbackTupleListNoTransform(); list.addChild(node); } /** - * Replaces the CallbacksTuple list element at index {@code i} with the new node {@code node}. + * Replaces the CallbackTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setCallbacksTuple(CallbacksTuple node, int i) { - JastAddList<CallbacksTuple> list = getCallbacksTupleList(); + public void setCallbackTuple(CallbackTuple node, int i) { + JastAddList<CallbackTuple> list = getCallbackTupleList(); list.setChild(node, i); } /** - * Retrieves the CallbacksTuple list. - * @return The node representing the CallbacksTuple list. + * Retrieves the CallbackTuple list. + * @return The node representing the CallbackTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="CallbacksTuple") - public JastAddList<CallbacksTuple> getCallbacksTupleList() { - JastAddList<CallbacksTuple> list = (JastAddList<CallbacksTuple>) getChild(8); + @ASTNodeAnnotation.ListChild(name="CallbackTuple") + public JastAddList<CallbackTuple> getCallbackTupleList() { + JastAddList<CallbackTuple> list = (JastAddList<CallbackTuple>) getChild(8); return list; } /** - * Retrieves the CallbacksTuple list. + * Retrieves the CallbackTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the CallbacksTuple list. + * @return The node representing the CallbackTuple list. * @apilevel low-level */ - public JastAddList<CallbacksTuple> getCallbacksTupleListNoTransform() { - return (JastAddList<CallbacksTuple>) getChildNoTransform(8); + public JastAddList<CallbackTuple> getCallbackTupleListNoTransform() { + return (JastAddList<CallbackTuple>) getChildNoTransform(8); } /** - * @return the element at index {@code i} in the CallbacksTuple list without + * @return the element at index {@code i} in the CallbackTuple list without * triggering rewrites. */ - public CallbacksTuple getCallbacksTupleNoTransform(int i) { - return (CallbacksTuple) getCallbacksTupleListNoTransform().getChildNoTransform(i); + public CallbackTuple getCallbackTupleNoTransform(int i) { + return (CallbackTuple) getCallbackTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the CallbacksTuple list. - * @return The node representing the CallbacksTuple list. + * Retrieves the CallbackTuple list. + * @return The node representing the CallbackTuple list. * @apilevel high-level */ - public JastAddList<CallbacksTuple> getCallbacksTuples() { - return getCallbacksTupleList(); + public JastAddList<CallbackTuple> getCallbackTuples() { + return getCallbackTupleList(); } /** - * Retrieves the CallbacksTuple list. + * Retrieves the CallbackTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the CallbacksTuple list. + * @return The node representing the CallbackTuple list. * @apilevel low-level */ - public JastAddList<CallbacksTuple> getCallbacksTuplesNoTransform() { - return getCallbacksTupleListNoTransform(); + public JastAddList<CallbackTuple> getCallbackTuplesNoTransform() { + return getCallbackTupleListNoTransform(); } /** @apilevel internal */ public ASTNode rewriteTo() { diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ContactObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ContactObject.java index 719e7c49f0ee87bd27bc3c67b65236b5ca519b00..98b0581534dcb1ec1f9de23997ceae2243c4bdcf 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ContactObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ContactObject.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:11 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:8 * @astdecl ContactObject : ASTNode ::= <Name:String> <Url:String> <Email:String>; * @production ContactObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Url:String></span> <span class="component"><Email:String></span>; @@ -17,23 +18,23 @@ import java.net.URL; public class ContactObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:68 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:73 */ public static Contact composeContact (ContactObject contactObject){ Contact contact = new Contact(); - if( contactObject.getName() != null ) + if( !contactObject.getName().isEmpty() ) contact.setName( contactObject.getName() ); - if( contactObject.getUrl() != null ) + if( !contactObject.getUrl().isEmpty() ) contact.setUrl( contactObject.getUrl() ); - if( contactObject.getEmail() != null ) + if( !contactObject.getEmail().isEmpty() ) contact.setEmail( contactObject.getEmail() ); return contact; } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:49 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:55 */ public static ContactObject parseContact(Contact contact){ ContactObject contactObject = new ContactObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentObjectTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentObjectTuple.java deleted file mode 100644 index 317531f12a64bfc9468698b6393149d3c3f86a11..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentObjectTuple.java +++ /dev/null @@ -1,206 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:87 - * @astdecl ContentObjectTuple : ContentTuple ::= <Name:String> MediaTypeObject; - * @production ContentObjectTuple : {@link ContentTuple} ::= <span class="component"><Name:String></span> <span class="component">{@link MediaTypeObject}</span>; - - */ -public class ContentObjectTuple extends ContentTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ContentObjectTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "MediaTypeObject"}, - type = {"String", "MediaTypeObject"}, - kind = {"Token", "Child"} - ) - public ContentObjectTuple(String p0, MediaTypeObject p1) { - setName(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public ContentObjectTuple clone() throws CloneNotSupportedException { - ContentObjectTuple node = (ContentObjectTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public ContentObjectTuple copy() { - try { - ContentObjectTuple node = (ContentObjectTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public ContentObjectTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public ContentObjectTuple treeCopyNoTransform() { - ContentObjectTuple tree = (ContentObjectTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public ContentObjectTuple treeCopy() { - ContentObjectTuple tree = (ContentObjectTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((ContentObjectTuple) node).tokenString_Name); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the MediaTypeObject child. - * @param node The new node to replace the MediaTypeObject child. - * @apilevel high-level - */ - public void setMediaTypeObject(MediaTypeObject node) { - setChild(node, 0); - } - /** - * Retrieves the MediaTypeObject child. - * @return The current node used as the MediaTypeObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="MediaTypeObject") - public MediaTypeObject getMediaTypeObject() { - return (MediaTypeObject) getChild(0); - } - /** - * Retrieves the MediaTypeObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the MediaTypeObject child. - * @apilevel low-level - */ - public MediaTypeObject getMediaTypeObjectNoTransform() { - return (MediaTypeObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentReferenceTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentReferenceTuple.java deleted file mode 100644 index d8b7e043678a14b1d419e57d2a7c4049e889982a..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentReferenceTuple.java +++ /dev/null @@ -1,199 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:88 - * @astdecl ContentReferenceTuple : ContentTuple ::= <Name:String> <Ref:String>; - * @production ContentReferenceTuple : {@link ContentTuple} ::= <span class="component"><Name:String></span> <span class="component"><Ref:String></span>; - - */ -public class ContentReferenceTuple extends ContentTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ContentReferenceTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Ref"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public ContentReferenceTuple(String p0, String p1) { - setName(p0); - setRef(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public ContentReferenceTuple clone() throws CloneNotSupportedException { - ContentReferenceTuple node = (ContentReferenceTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public ContentReferenceTuple copy() { - try { - ContentReferenceTuple node = (ContentReferenceTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public ContentReferenceTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public ContentReferenceTuple treeCopyNoTransform() { - ContentReferenceTuple tree = (ContentReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public ContentReferenceTuple treeCopy() { - ContentReferenceTuple tree = (ContentReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((ContentReferenceTuple) node).tokenString_Name) && (tokenString_Ref == ((ContentReferenceTuple) node).tokenString_Ref); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentTuple.java index 433503b709c895c906ac13d054adf55471474cce..8d544ccd2555070a7f74e0324e31616271ef79c2 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ContentTuple.java @@ -4,17 +4,18 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:86 - * @astdecl ContentTuple : ASTNode; - * @production ContentTuple : {@link ASTNode}; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:57 + * @astdecl ContentTuple : ASTNode ::= <Key:String> MediaTypeObject; + * @production ContentTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link MediaTypeObject}</span>; */ -public abstract class ContentTuple extends ASTNode<ASTNode> implements Cloneable { +public class ContentTuple extends ASTNode<ASTNode> implements Cloneable { /** * @declaredat ASTNode:1 */ @@ -29,66 +30,172 @@ public abstract class ContentTuple extends ASTNode<ASTNode> implements Cloneable * @declaredat ASTNode:10 */ public void init$Children() { + children = new ASTNode[1]; } - /** @apilevel low-level + /** * @declaredat ASTNode:13 */ + @ASTNodeAnnotation.Constructor( + name = {"Key", "MediaTypeObject"}, + type = {"String", "MediaTypeObject"}, + kind = {"Token", "Child"} + ) + public ContentTuple(String p0, MediaTypeObject p1) { + setKey(p0); + setChild(p1, 0); + } + /** @apilevel low-level + * @declaredat ASTNode:23 + */ protected int numChildren() { - return 0; + return 1; } /** * @apilevel internal - * @declaredat ASTNode:19 + * @declaredat ASTNode:29 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:23 + * @declaredat ASTNode:33 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:27 + * @declaredat ASTNode:37 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:31 + * @declaredat ASTNode:41 */ public ContentTuple clone() throws CloneNotSupportedException { ContentTuple node = (ContentTuple) super.clone(); return node; } + /** @apilevel internal + * @declaredat ASTNode:46 + */ + public ContentTuple copy() { + try { + ContentTuple node = (ContentTuple) clone(); + node.parent = null; + if (children != null) { + node.children = (ASTNode[]) children.clone(); + } + return node; + } catch (CloneNotSupportedException e) { + throw new Error("Error: clone not supported for " + getClass().getName()); + } + } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:42 + * @declaredat ASTNode:65 */ @Deprecated - public abstract ContentTuple fullCopy(); + public ContentTuple fullCopy() { + return treeCopyNoTransform(); + } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:50 + * @declaredat ASTNode:75 */ - public abstract ContentTuple treeCopyNoTransform(); + public ContentTuple treeCopyNoTransform() { + ContentTuple tree = (ContentTuple) copy(); + if (children != null) { + for (int i = 0; i < children.length; ++i) { + ASTNode child = (ASTNode) children[i]; + if (child != null) { + child = child.treeCopyNoTransform(); + tree.setChild(child, i); + } + } + } + return tree; + } /** * Create a deep copy of the AST subtree at this node. * The subtree of this node is traversed to trigger rewrites before copy. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:58 + * @declaredat ASTNode:95 + */ + public ContentTuple treeCopy() { + ContentTuple tree = (ContentTuple) copy(); + if (children != null) { + for (int i = 0; i < children.length; ++i) { + ASTNode child = (ASTNode) getChild(i); + if (child != null) { + child = child.treeCopy(); + tree.setChild(child, i); + } + } + } + return tree; + } + /** @apilevel internal + * @declaredat ASTNode:109 + */ + protected boolean is$Equal(ASTNode node) { + return super.is$Equal(node) && (tokenString_Key == ((ContentTuple) node).tokenString_Key); + } + /** + * Replaces the lexeme Key. + * @param value The new value for the lexeme Key. + * @apilevel high-level + */ + public void setKey(String value) { + tokenString_Key = value; + } + /** @apilevel internal + */ + protected String tokenString_Key; + /** + * Retrieves the value for the lexeme Key. + * @return The value for the lexeme Key. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="Key") + public String getKey() { + return tokenString_Key != null ? tokenString_Key : ""; + } + /** + * Replaces the MediaTypeObject child. + * @param node The new node to replace the MediaTypeObject child. + * @apilevel high-level + */ + public void setMediaTypeObject(MediaTypeObject node) { + setChild(node, 0); + } + /** + * Retrieves the MediaTypeObject child. + * @return The current node used as the MediaTypeObject child. + * @apilevel high-level + */ + @ASTNodeAnnotation.Child(name="MediaTypeObject") + public MediaTypeObject getMediaTypeObject() { + return (MediaTypeObject) getChild(0); + } + /** + * Retrieves the MediaTypeObject child. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The current node used as the MediaTypeObject child. + * @apilevel low-level */ - public abstract ContentTuple treeCopy(); + public MediaTypeObject getMediaTypeObjectNoTransform() { + return (MediaTypeObject) getChildNoTransform(0); + } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Delete.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Delete.java index 5f868b938fa73fee0fa67255f03e1a0b7932316f..e5b2cfb8f50c4071a2514714f393dc31a6c14399 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Delete.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Delete.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:67 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:42 * @astdecl Delete : ASTNode ::= OperationObject; * @production Delete : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/DeprecatedBoolean.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/DeprecatedBoolean.java deleted file mode 100644 index c0605f1612dcc687153e5ea3b1a5315f697121b9..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/DeprecatedBoolean.java +++ /dev/null @@ -1,178 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:78 - * @astdecl DeprecatedBoolean : ASTNode ::= <DeprecatedBoolean:Boolean>; - * @production DeprecatedBoolean : {@link ASTNode} ::= <span class="component"><DeprecatedBoolean:Boolean></span>; - - */ -public class DeprecatedBoolean extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public DeprecatedBoolean() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"DeprecatedBoolean"}, - type = {"Boolean"}, - kind = {"Token"} - ) - public DeprecatedBoolean(Boolean p0) { - setDeprecatedBoolean(p0); - } - /** @apilevel low-level - * @declaredat ASTNode:21 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:27 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:35 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:39 - */ - public DeprecatedBoolean clone() throws CloneNotSupportedException { - DeprecatedBoolean node = (DeprecatedBoolean) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:44 - */ - public DeprecatedBoolean copy() { - try { - DeprecatedBoolean node = (DeprecatedBoolean) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:63 - */ - @Deprecated - public DeprecatedBoolean fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:73 - */ - public DeprecatedBoolean treeCopyNoTransform() { - DeprecatedBoolean tree = (DeprecatedBoolean) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:93 - */ - public DeprecatedBoolean treeCopy() { - DeprecatedBoolean tree = (DeprecatedBoolean) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:107 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenBoolean_DeprecatedBoolean == ((DeprecatedBoolean) node).tokenBoolean_DeprecatedBoolean); - } - /** - * Replaces the lexeme DeprecatedBoolean. - * @param value The new value for the lexeme DeprecatedBoolean. - * @apilevel high-level - */ - public void setDeprecatedBoolean(Boolean value) { - tokenBoolean_DeprecatedBoolean = value; - } - /** @apilevel internal - */ - protected Boolean tokenBoolean_DeprecatedBoolean; - /** - * Retrieves the value for the lexeme DeprecatedBoolean. - * @return The value for the lexeme DeprecatedBoolean. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="DeprecatedBoolean") - public Boolean getDeprecatedBoolean() { - return tokenBoolean_DeprecatedBoolean; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.java index 97c3c90473866d32b7cc4ea43a7f78da190fe57d..e46ae508b4f3f27f400f0ba19e0a3c95d8f231ff 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:141 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:103 * @astdecl DiscriminatorObject : ASTNode ::= <PropertyName:String> MappingTuple*; * @production DiscriminatorObject : {@link ASTNode} ::= <span class="component"><PropertyName:String></span> <span class="component">{@link MappingTuple}*</span>; @@ -17,7 +18,7 @@ import java.net.URL; public class DiscriminatorObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:653 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:686 */ public static Discriminator composeDiscriminator (DiscriminatorObject discriminatorObject) { Discriminator discriminator = new Discriminator(); @@ -35,7 +36,7 @@ public class DiscriminatorObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:734 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:717 */ public static DiscriminatorObject parseDiscriminator (Discriminator discriminator) { DiscriminatorObject discriminatorObject = new DiscriminatorObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObject.java index b8b7f2eb27624b0bfcf037d7b641cc70b08204a8..5220d8405f1d05b966d727478a783f3c340263fe 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObject.java @@ -4,42 +4,49 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:100 - * @astdecl EncodingObject : ASTNode ::= <ContentType:String> HeadersTuple* <Style:String> <Explode:Object> <AllowReserved:Object>; - * @production EncodingObject : {@link ASTNode} ::= <span class="component"><ContentType:String></span> <span class="component">{@link HeadersTuple}*</span> <span class="component"><Style:String></span> <span class="component"><Explode:Object></span> <span class="component"><AllowReserved:Object></span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:67 + * @astdecl EncodingObject : ASTNode ::= <ContentType:String> HeaderTuple* <Style:String> <Explode:Boolean> <AllowReserved:Boolean> Extension*; + * @production EncodingObject : {@link ASTNode} ::= <span class="component"><ContentType:String></span> <span class="component">{@link HeaderTuple}*</span> <span class="component"><Style:String></span> <span class="component"><Explode:Boolean></span> <span class="component"><AllowReserved:Boolean></span> <span class="component">{@link Extension}*</span>; */ public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:426 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:440 */ public static EncodingProperty composeEncodingProperty (EncodingObject encodingObject){ EncodingProperty encodingProperty = new EncodingProperty(); - if( encodingObject.getContentType() != null ) + if( !encodingObject.getContentType().isEmpty() ) encodingProperty.setContentType( encodingObject.getContentType() ); - if( encodingObject.getNumHeadersTuple() != 0 ){ + if( encodingObject.getNumHeaderTuple() != 0 ){ Map<String, Header> headers = new HashMap<>(); - for( HeadersTuple t : encodingObject.getHeadersTuples() ) - headers.put( ((HeaderObjectTuple)t).getName(), HeaderObject.composeHeader( ((HeaderObjectTuple)t).getHeaderObject() ) ); + for( HeaderTuple t : encodingObject.getHeaderTuples() ) + headers.put(t.getKey(), HeaderObject.composeHeader(t.getHeaderObject())); encodingProperty.setHeaders(headers); } - if( encodingObject.getStyle() != null ) + if( !encodingObject.getStyle().isEmpty() ) encodingProperty.setStyle(encodingObject.getStyle()); if( encodingObject.getExplode() != null ) - encodingProperty.setExplode( (boolean) encodingObject.getExplode() ); + encodingProperty.setExplode(encodingObject.getExplode()); + if( encodingObject.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : encodingObject.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + encodingProperty.setExtensions(extensionMap); + } return encodingProperty; } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:492 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:465 */ public static EncodingObject parseEncoding(EncodingProperty encodingProperty){ EncodingObject encodingObject = new EncodingObject(); @@ -48,13 +55,16 @@ public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { encodingObject.setContentType( encodingProperty.getContentType() ); if( encodingProperty.getHeaders() != null ){ for( String key : encodingProperty.getHeaders().keySet() ) - encodingObject.addHeadersTuple(new HeaderObjectTuple(key, HeaderObject.parseHeader(encodingProperty.getHeader(key)))); + encodingObject.addHeaderTuple(new HeaderTuple(key, HeaderObject.parseHeader(encodingProperty.getHeader(key)))); } if( encodingProperty.getStyle() != null ) encodingObject.setStyle( encodingProperty.getStyle() ); if( encodingProperty.getExplode() != null ) encodingObject.setExplode( encodingProperty.getExplode() ); - // if( encodingProperty.getAllowReserved() != null ) /** parser for allowReserved non-existent **/ + if( encodingProperty.getExtensions() != null ){ + for( String key : encodingProperty.getExtensions().keySet() ) + encodingObject.addExtension(new Extension(key, encodingProperty.getExtensions().get(key))); + } return encodingObject; } @@ -72,58 +82,60 @@ public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[1]; + children = new ASTNode[2]; setChild(new JastAddList(), 0); + setChild(new JastAddList(), 1); } /** - * @declaredat ASTNode:14 + * @declaredat ASTNode:15 */ @ASTNodeAnnotation.Constructor( - name = {"ContentType", "HeadersTuple", "Style", "Explode", "AllowReserved"}, - type = {"String", "JastAddList<HeadersTuple>", "String", "Object", "Object"}, - kind = {"Token", "List", "Token", "Token", "Token"} + name = {"ContentType", "HeaderTuple", "Style", "Explode", "AllowReserved", "Extension"}, + type = {"String", "JastAddList<HeaderTuple>", "String", "Boolean", "Boolean", "JastAddList<Extension>"}, + kind = {"Token", "List", "Token", "Token", "Token", "List"} ) - public EncodingObject(String p0, JastAddList<HeadersTuple> p1, String p2, Object p3, Object p4) { + public EncodingObject(String p0, JastAddList<HeaderTuple> p1, String p2, Boolean p3, Boolean p4, JastAddList<Extension> p5) { setContentType(p0); setChild(p1, 0); setStyle(p2); setExplode(p3); setAllowReserved(p4); + setChild(p5, 1); } /** @apilevel low-level - * @declaredat ASTNode:27 + * @declaredat ASTNode:29 */ protected int numChildren() { - return 1; + return 2; } /** * @apilevel internal - * @declaredat ASTNode:33 + * @declaredat ASTNode:35 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:37 + * @declaredat ASTNode:39 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:41 + * @declaredat ASTNode:43 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:45 + * @declaredat ASTNode:47 */ public EncodingObject clone() throws CloneNotSupportedException { EncodingObject node = (EncodingObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:50 + * @declaredat ASTNode:52 */ public EncodingObject copy() { try { @@ -143,7 +155,7 @@ public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:69 + * @declaredat ASTNode:71 */ @Deprecated public EncodingObject fullCopy() { @@ -154,7 +166,7 @@ public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:79 + * @declaredat ASTNode:81 */ public EncodingObject treeCopyNoTransform() { EncodingObject tree = (EncodingObject) copy(); @@ -175,7 +187,7 @@ public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:99 + * @declaredat ASTNode:101 */ public EncodingObject treeCopy() { EncodingObject tree = (EncodingObject) copy(); @@ -191,10 +203,10 @@ public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:113 + * @declaredat ASTNode:115 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_ContentType == ((EncodingObject) node).tokenString_ContentType) && (tokenString_Style == ((EncodingObject) node).tokenString_Style) && (tokenObject_Explode == ((EncodingObject) node).tokenObject_Explode) && (tokenObject_AllowReserved == ((EncodingObject) node).tokenObject_AllowReserved); + return super.is$Equal(node) && (tokenString_ContentType == ((EncodingObject) node).tokenString_ContentType) && (tokenString_Style == ((EncodingObject) node).tokenString_Style) && (tokenBoolean_Explode == ((EncodingObject) node).tokenBoolean_Explode) && (tokenBoolean_AllowReserved == ((EncodingObject) node).tokenBoolean_AllowReserved); } /** * Replaces the lexeme ContentType. @@ -217,114 +229,114 @@ public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { return tokenString_ContentType != null ? tokenString_ContentType : ""; } /** - * Replaces the HeadersTuple list. - * @param list The new list node to be used as the HeadersTuple list. + * Replaces the HeaderTuple list. + * @param list The new list node to be used as the HeaderTuple list. * @apilevel high-level */ - public void setHeadersTupleList(JastAddList<HeadersTuple> list) { + public void setHeaderTupleList(JastAddList<HeaderTuple> list) { setChild(list, 0); } /** - * Retrieves the number of children in the HeadersTuple list. - * @return Number of children in the HeadersTuple list. + * Retrieves the number of children in the HeaderTuple list. + * @return Number of children in the HeaderTuple list. * @apilevel high-level */ - public int getNumHeadersTuple() { - return getHeadersTupleList().getNumChild(); + public int getNumHeaderTuple() { + return getHeaderTupleList().getNumChild(); } /** - * Retrieves the number of children in the HeadersTuple list. + * Retrieves the number of children in the HeaderTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the HeadersTuple list. + * @return Number of children in the HeaderTuple list. * @apilevel low-level */ - public int getNumHeadersTupleNoTransform() { - return getHeadersTupleListNoTransform().getNumChildNoTransform(); + public int getNumHeaderTupleNoTransform() { + return getHeaderTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the HeadersTuple list. + * Retrieves the element at index {@code i} in the HeaderTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the HeadersTuple list. + * @return The element at position {@code i} in the HeaderTuple list. * @apilevel high-level */ - public HeadersTuple getHeadersTuple(int i) { - return (HeadersTuple) getHeadersTupleList().getChild(i); + public HeaderTuple getHeaderTuple(int i) { + return (HeaderTuple) getHeaderTupleList().getChild(i); } /** - * Check whether the HeadersTuple list has any children. + * Check whether the HeaderTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasHeadersTuple() { - return getHeadersTupleList().getNumChild() != 0; + public boolean hasHeaderTuple() { + return getHeaderTupleList().getNumChild() != 0; } /** - * Append an element to the HeadersTuple list. - * @param node The element to append to the HeadersTuple list. + * Append an element to the HeaderTuple list. + * @param node The element to append to the HeaderTuple list. * @apilevel high-level */ - public void addHeadersTuple(HeadersTuple node) { - JastAddList<HeadersTuple> list = (parent == null) ? getHeadersTupleListNoTransform() : getHeadersTupleList(); + public void addHeaderTuple(HeaderTuple node) { + JastAddList<HeaderTuple> list = (parent == null) ? getHeaderTupleListNoTransform() : getHeaderTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addHeadersTupleNoTransform(HeadersTuple node) { - JastAddList<HeadersTuple> list = getHeadersTupleListNoTransform(); + public void addHeaderTupleNoTransform(HeaderTuple node) { + JastAddList<HeaderTuple> list = getHeaderTupleListNoTransform(); list.addChild(node); } /** - * Replaces the HeadersTuple list element at index {@code i} with the new node {@code node}. + * Replaces the HeaderTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setHeadersTuple(HeadersTuple node, int i) { - JastAddList<HeadersTuple> list = getHeadersTupleList(); + public void setHeaderTuple(HeaderTuple node, int i) { + JastAddList<HeaderTuple> list = getHeaderTupleList(); list.setChild(node, i); } /** - * Retrieves the HeadersTuple list. - * @return The node representing the HeadersTuple list. + * Retrieves the HeaderTuple list. + * @return The node representing the HeaderTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="HeadersTuple") - public JastAddList<HeadersTuple> getHeadersTupleList() { - JastAddList<HeadersTuple> list = (JastAddList<HeadersTuple>) getChild(0); + @ASTNodeAnnotation.ListChild(name="HeaderTuple") + public JastAddList<HeaderTuple> getHeaderTupleList() { + JastAddList<HeaderTuple> list = (JastAddList<HeaderTuple>) getChild(0); return list; } /** - * Retrieves the HeadersTuple list. + * Retrieves the HeaderTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeadersTuple list. + * @return The node representing the HeaderTuple list. * @apilevel low-level */ - public JastAddList<HeadersTuple> getHeadersTupleListNoTransform() { - return (JastAddList<HeadersTuple>) getChildNoTransform(0); + public JastAddList<HeaderTuple> getHeaderTupleListNoTransform() { + return (JastAddList<HeaderTuple>) getChildNoTransform(0); } /** - * @return the element at index {@code i} in the HeadersTuple list without + * @return the element at index {@code i} in the HeaderTuple list without * triggering rewrites. */ - public HeadersTuple getHeadersTupleNoTransform(int i) { - return (HeadersTuple) getHeadersTupleListNoTransform().getChildNoTransform(i); + public HeaderTuple getHeaderTupleNoTransform(int i) { + return (HeaderTuple) getHeaderTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the HeadersTuple list. - * @return The node representing the HeadersTuple list. + * Retrieves the HeaderTuple list. + * @return The node representing the HeaderTuple list. * @apilevel high-level */ - public JastAddList<HeadersTuple> getHeadersTuples() { - return getHeadersTupleList(); + public JastAddList<HeaderTuple> getHeaderTuples() { + return getHeaderTupleList(); } /** - * Retrieves the HeadersTuple list. + * Retrieves the HeaderTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeadersTuple list. + * @return The node representing the HeaderTuple list. * @apilevel low-level */ - public JastAddList<HeadersTuple> getHeadersTuplesNoTransform() { - return getHeadersTupleListNoTransform(); + public JastAddList<HeaderTuple> getHeaderTuplesNoTransform() { + return getHeaderTupleListNoTransform(); } /** * Replaces the lexeme Style. @@ -351,40 +363,150 @@ public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { * @param value The new value for the lexeme Explode. * @apilevel high-level */ - public void setExplode(Object value) { - tokenObject_Explode = value; + public void setExplode(Boolean value) { + tokenBoolean_Explode = value; } /** @apilevel internal */ - protected Object tokenObject_Explode; + protected Boolean tokenBoolean_Explode; /** * Retrieves the value for the lexeme Explode. * @return The value for the lexeme Explode. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="Explode") - public Object getExplode() { - return tokenObject_Explode; + public Boolean getExplode() { + return tokenBoolean_Explode; } /** * Replaces the lexeme AllowReserved. * @param value The new value for the lexeme AllowReserved. * @apilevel high-level */ - public void setAllowReserved(Object value) { - tokenObject_AllowReserved = value; + public void setAllowReserved(Boolean value) { + tokenBoolean_AllowReserved = value; } /** @apilevel internal */ - protected Object tokenObject_AllowReserved; + protected Boolean tokenBoolean_AllowReserved; /** * Retrieves the value for the lexeme AllowReserved. * @return The value for the lexeme AllowReserved. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="AllowReserved") - public Object getAllowReserved() { - return tokenObject_AllowReserved; + public Boolean getAllowReserved() { + return tokenBoolean_AllowReserved; + } + /** + * Replaces the Extension list. + * @param list The new list node to be used as the Extension list. + * @apilevel high-level + */ + public void setExtensionList(JastAddList<Extension> list) { + setChild(list, 1); + } + /** + * Retrieves the number of children in the Extension list. + * @return Number of children in the Extension list. + * @apilevel high-level + */ + public int getNumExtension() { + return getExtensionList().getNumChild(); + } + /** + * Retrieves the number of children in the Extension list. + * Calling this method will not trigger rewrites. + * @return Number of children in the Extension list. + * @apilevel low-level + */ + public int getNumExtensionNoTransform() { + return getExtensionListNoTransform().getNumChildNoTransform(); + } + /** + * Retrieves the element at index {@code i} in the Extension list. + * @param i Index of the element to return. + * @return The element at position {@code i} in the Extension list. + * @apilevel high-level + */ + public Extension getExtension(int i) { + return (Extension) getExtensionList().getChild(i); + } + /** + * Check whether the Extension list has any children. + * @return {@code true} if it has at least one child, {@code false} otherwise. + * @apilevel high-level + */ + public boolean hasExtension() { + return getExtensionList().getNumChild() != 0; + } + /** + * Append an element to the Extension list. + * @param node The element to append to the Extension list. + * @apilevel high-level + */ + public void addExtension(Extension node) { + JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); + list.addChild(node); + } + /** @apilevel low-level + */ + public void addExtensionNoTransform(Extension node) { + JastAddList<Extension> list = getExtensionListNoTransform(); + list.addChild(node); + } + /** + * Replaces the Extension list element at index {@code i} with the new node {@code node}. + * @param node The new node to replace the old list element. + * @param i The list index of the node to be replaced. + * @apilevel high-level + */ + public void setExtension(Extension node, int i) { + JastAddList<Extension> list = getExtensionList(); + list.setChild(node, i); + } + /** + * Retrieves the Extension list. + * @return The node representing the Extension list. + * @apilevel high-level + */ + @ASTNodeAnnotation.ListChild(name="Extension") + public JastAddList<Extension> getExtensionList() { + JastAddList<Extension> list = (JastAddList<Extension>) getChild(1); + return list; + } + /** + * Retrieves the Extension list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the Extension list. + * @apilevel low-level + */ + public JastAddList<Extension> getExtensionListNoTransform() { + return (JastAddList<Extension>) getChildNoTransform(1); + } + /** + * @return the element at index {@code i} in the Extension list without + * triggering rewrites. + */ + public Extension getExtensionNoTransform(int i) { + return (Extension) getExtensionListNoTransform().getChildNoTransform(i); + } + /** + * Retrieves the Extension list. + * @return The node representing the Extension list. + * @apilevel high-level + */ + public JastAddList<Extension> getExtensions() { + return getExtensionList(); + } + /** + * Retrieves the Extension list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the Extension list. + * @apilevel low-level + */ + public JastAddList<Extension> getExtensionsNoTransform() { + return getExtensionListNoTransform(); } /** @apilevel internal */ public ASTNode rewriteTo() { diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObjectTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObjectTuple.java deleted file mode 100644 index 24b941926e3014831ad79547880cc3ee1d29a493..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObjectTuple.java +++ /dev/null @@ -1,206 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:96 - * @astdecl EncodingObjectTuple : EncodingTuple ::= <Name:String> EncodingObject; - * @production EncodingObjectTuple : {@link EncodingTuple} ::= <span class="component"><Name:String></span> <span class="component">{@link EncodingObject}</span>; - - */ -public class EncodingObjectTuple extends EncodingTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public EncodingObjectTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "EncodingObject"}, - type = {"String", "EncodingObject"}, - kind = {"Token", "Child"} - ) - public EncodingObjectTuple(String p0, EncodingObject p1) { - setName(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public EncodingObjectTuple clone() throws CloneNotSupportedException { - EncodingObjectTuple node = (EncodingObjectTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public EncodingObjectTuple copy() { - try { - EncodingObjectTuple node = (EncodingObjectTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public EncodingObjectTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public EncodingObjectTuple treeCopyNoTransform() { - EncodingObjectTuple tree = (EncodingObjectTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public EncodingObjectTuple treeCopy() { - EncodingObjectTuple tree = (EncodingObjectTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((EncodingObjectTuple) node).tokenString_Name); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the EncodingObject child. - * @param node The new node to replace the EncodingObject child. - * @apilevel high-level - */ - public void setEncodingObject(EncodingObject node) { - setChild(node, 0); - } - /** - * Retrieves the EncodingObject child. - * @return The current node used as the EncodingObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="EncodingObject") - public EncodingObject getEncodingObject() { - return (EncodingObject) getChild(0); - } - /** - * Retrieves the EncodingObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the EncodingObject child. - * @apilevel low-level - */ - public EncodingObject getEncodingObjectNoTransform() { - return (EncodingObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingReferenceTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingReferenceTuple.java deleted file mode 100644 index 99554c667c7eb8df06d4c81cbcfce135b5623504..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingReferenceTuple.java +++ /dev/null @@ -1,199 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:97 - * @astdecl EncodingReferenceTuple : EncodingTuple ::= <Name:String> <Ref:String>; - * @production EncodingReferenceTuple : {@link EncodingTuple} ::= <span class="component"><Name:String></span> <span class="component"><Ref:String></span>; - - */ -public class EncodingReferenceTuple extends EncodingTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public EncodingReferenceTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Ref"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public EncodingReferenceTuple(String p0, String p1) { - setName(p0); - setRef(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public EncodingReferenceTuple clone() throws CloneNotSupportedException { - EncodingReferenceTuple node = (EncodingReferenceTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public EncodingReferenceTuple copy() { - try { - EncodingReferenceTuple node = (EncodingReferenceTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public EncodingReferenceTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public EncodingReferenceTuple treeCopyNoTransform() { - EncodingReferenceTuple tree = (EncodingReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public EncodingReferenceTuple treeCopy() { - EncodingReferenceTuple tree = (EncodingReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((EncodingReferenceTuple) node).tokenString_Name) && (tokenString_Ref == ((EncodingReferenceTuple) node).tokenString_Ref); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingTuple.java index 3cd262d9fc7db8a410d826254ddafafc192ceb24..c8b4e5c1e4057ef89bc2569cd22aef646f5fa4af 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingTuple.java @@ -4,17 +4,18 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:95 - * @astdecl EncodingTuple : ASTNode; - * @production EncodingTuple : {@link ASTNode}; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:64 + * @astdecl EncodingTuple : ASTNode ::= <Key:String> EncodingObject; + * @production EncodingTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link EncodingObject}</span>; */ -public abstract class EncodingTuple extends ASTNode<ASTNode> implements Cloneable { +public class EncodingTuple extends ASTNode<ASTNode> implements Cloneable { /** * @declaredat ASTNode:1 */ @@ -29,66 +30,172 @@ public abstract class EncodingTuple extends ASTNode<ASTNode> implements Cloneabl * @declaredat ASTNode:10 */ public void init$Children() { + children = new ASTNode[1]; } - /** @apilevel low-level + /** * @declaredat ASTNode:13 */ + @ASTNodeAnnotation.Constructor( + name = {"Key", "EncodingObject"}, + type = {"String", "EncodingObject"}, + kind = {"Token", "Child"} + ) + public EncodingTuple(String p0, EncodingObject p1) { + setKey(p0); + setChild(p1, 0); + } + /** @apilevel low-level + * @declaredat ASTNode:23 + */ protected int numChildren() { - return 0; + return 1; } /** * @apilevel internal - * @declaredat ASTNode:19 + * @declaredat ASTNode:29 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:23 + * @declaredat ASTNode:33 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:27 + * @declaredat ASTNode:37 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:31 + * @declaredat ASTNode:41 */ public EncodingTuple clone() throws CloneNotSupportedException { EncodingTuple node = (EncodingTuple) super.clone(); return node; } + /** @apilevel internal + * @declaredat ASTNode:46 + */ + public EncodingTuple copy() { + try { + EncodingTuple node = (EncodingTuple) clone(); + node.parent = null; + if (children != null) { + node.children = (ASTNode[]) children.clone(); + } + return node; + } catch (CloneNotSupportedException e) { + throw new Error("Error: clone not supported for " + getClass().getName()); + } + } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:42 + * @declaredat ASTNode:65 */ @Deprecated - public abstract EncodingTuple fullCopy(); + public EncodingTuple fullCopy() { + return treeCopyNoTransform(); + } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:50 + * @declaredat ASTNode:75 */ - public abstract EncodingTuple treeCopyNoTransform(); + public EncodingTuple treeCopyNoTransform() { + EncodingTuple tree = (EncodingTuple) copy(); + if (children != null) { + for (int i = 0; i < children.length; ++i) { + ASTNode child = (ASTNode) children[i]; + if (child != null) { + child = child.treeCopyNoTransform(); + tree.setChild(child, i); + } + } + } + return tree; + } /** * Create a deep copy of the AST subtree at this node. * The subtree of this node is traversed to trigger rewrites before copy. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:58 + * @declaredat ASTNode:95 + */ + public EncodingTuple treeCopy() { + EncodingTuple tree = (EncodingTuple) copy(); + if (children != null) { + for (int i = 0; i < children.length; ++i) { + ASTNode child = (ASTNode) getChild(i); + if (child != null) { + child = child.treeCopy(); + tree.setChild(child, i); + } + } + } + return tree; + } + /** @apilevel internal + * @declaredat ASTNode:109 + */ + protected boolean is$Equal(ASTNode node) { + return super.is$Equal(node) && (tokenString_Key == ((EncodingTuple) node).tokenString_Key); + } + /** + * Replaces the lexeme Key. + * @param value The new value for the lexeme Key. + * @apilevel high-level + */ + public void setKey(String value) { + tokenString_Key = value; + } + /** @apilevel internal + */ + protected String tokenString_Key; + /** + * Retrieves the value for the lexeme Key. + * @return The value for the lexeme Key. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="Key") + public String getKey() { + return tokenString_Key != null ? tokenString_Key : ""; + } + /** + * Replaces the EncodingObject child. + * @param node The new node to replace the EncodingObject child. + * @apilevel high-level + */ + public void setEncodingObject(EncodingObject node) { + setChild(node, 0); + } + /** + * Retrieves the EncodingObject child. + * @return The current node used as the EncodingObject child. + * @apilevel high-level + */ + @ASTNodeAnnotation.Child(name="EncodingObject") + public EncodingObject getEncodingObject() { + return (EncodingObject) getChild(0); + } + /** + * Retrieves the EncodingObject child. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The current node used as the EncodingObject child. + * @apilevel low-level */ - public abstract EncodingTuple treeCopy(); + public EncodingObject getEncodingObjectNoTransform() { + return (EncodingObject) getChildNoTransform(0); + } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Enum.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Enum.java index c9130eb2dc89bd88a4a1d944d5a74ec01b05c560..6aae43507a3963fbc1be8482bf846103f2cc557f 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Enum.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Enum.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:26 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:19 * @astdecl Enum : ASTNode ::= <EnumValue:String>; * @production Enum : {@link ASTNode} ::= <span class="component"><EnumValue:String></span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/EnumObj.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/EnumObj.java index 1f45d4fcdb8cdda82649f703b18488154d11a465..c5076319c3698e20e193191d9bf6b801303950a7 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/EnumObj.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/EnumObj.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:131 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:93 * @astdecl EnumObj : ASTNode ::= <EnumOb:Object>; * @production EnumObj : {@link ASTNode} ::= <span class="component"><EnumOb:Object></span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObject.java index 9e1656efe2a673166fc7220917fe1bea2d541d2f..19b78111fb1108e94404675b80b16c34444dcefc 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObject.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:116 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:78 * @astdecl ExampleObject : ASTNode ::= <Summary:String> <Description:String> <Value:Object> <ExternalValue:String>; * @production ExampleObject : {@link ASTNode} ::= <span class="component"><Summary:String></span> <span class="component"><Description:String></span> <span class="component"><Value:Object></span> <span class="component"><ExternalValue:String></span>; @@ -17,7 +18,7 @@ import java.net.URL; public class ExampleObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:484 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:507 */ public static Example composeExample (ExampleObject exampleObject){ Example example = new Example(); @@ -35,7 +36,7 @@ public class ExampleObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:542 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:520 */ public static ExampleObject parseExample(Example example){ ExampleObject exampleObject = new ExampleObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleReferenceTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleReferenceTuple.java deleted file mode 100644 index fb0594d256621ed79f3a27a1f4921341b8ec9960..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleReferenceTuple.java +++ /dev/null @@ -1,199 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:41 - * @astdecl ExampleReferenceTuple : ExamplesTuple ::= <Name:String> <Ref:String>; - * @production ExampleReferenceTuple : {@link ExamplesTuple} ::= <span class="component"><Name:String></span> <span class="component"><Ref:String></span>; - - */ -public class ExampleReferenceTuple extends ExamplesTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ExampleReferenceTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Ref"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public ExampleReferenceTuple(String p0, String p1) { - setName(p0); - setRef(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public ExampleReferenceTuple clone() throws CloneNotSupportedException { - ExampleReferenceTuple node = (ExampleReferenceTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public ExampleReferenceTuple copy() { - try { - ExampleReferenceTuple node = (ExampleReferenceTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public ExampleReferenceTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public ExampleReferenceTuple treeCopyNoTransform() { - ExampleReferenceTuple tree = (ExampleReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public ExampleReferenceTuple treeCopy() { - ExampleReferenceTuple tree = (ExampleReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((ExampleReferenceTuple) node).tokenString_Name) && (tokenString_Ref == ((ExampleReferenceTuple) node).tokenString_Ref); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObjectTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleTuple.java similarity index 73% rename from src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObjectTuple.java rename to src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleTuple.java index a79192a0c7377bbff58f9de9c4889fba816a1053..931b15c08ad3758f129c0d1d0e6fe53b93538151 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObjectTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleTuple.java @@ -4,21 +4,22 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:40 - * @astdecl ExampleObjectTuple : ExamplesTuple ::= <Name:String> ExampleObject; - * @production ExampleObjectTuple : {@link ExamplesTuple} ::= <span class="component"><Name:String></span> <span class="component">{@link ExampleObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:26 + * @astdecl ExampleTuple : ASTNode ::= <Key:String> ExampleObject; + * @production ExampleTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link ExampleObject}</span>; */ -public class ExampleObjectTuple extends ExamplesTuple implements Cloneable { +public class ExampleTuple extends ASTNode<ASTNode> implements Cloneable { /** * @declaredat ASTNode:1 */ - public ExampleObjectTuple() { + public ExampleTuple() { super(); } /** @@ -35,12 +36,12 @@ public class ExampleObjectTuple extends ExamplesTuple implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "ExampleObject"}, + name = {"Key", "ExampleObject"}, type = {"String", "ExampleObject"}, kind = {"Token", "Child"} ) - public ExampleObjectTuple(String p0, ExampleObject p1) { - setName(p0); + public ExampleTuple(String p0, ExampleObject p1) { + setKey(p0); setChild(p1, 0); } /** @apilevel low-level @@ -71,16 +72,16 @@ public class ExampleObjectTuple extends ExamplesTuple implements Cloneable { /** @apilevel internal * @declaredat ASTNode:41 */ - public ExampleObjectTuple clone() throws CloneNotSupportedException { - ExampleObjectTuple node = (ExampleObjectTuple) super.clone(); + public ExampleTuple clone() throws CloneNotSupportedException { + ExampleTuple node = (ExampleTuple) super.clone(); return node; } /** @apilevel internal * @declaredat ASTNode:46 */ - public ExampleObjectTuple copy() { + public ExampleTuple copy() { try { - ExampleObjectTuple node = (ExampleObjectTuple) clone(); + ExampleTuple node = (ExampleTuple) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); @@ -99,7 +100,7 @@ public class ExampleObjectTuple extends ExamplesTuple implements Cloneable { * @declaredat ASTNode:65 */ @Deprecated - public ExampleObjectTuple fullCopy() { + public ExampleTuple fullCopy() { return treeCopyNoTransform(); } /** @@ -109,8 +110,8 @@ public class ExampleObjectTuple extends ExamplesTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:75 */ - public ExampleObjectTuple treeCopyNoTransform() { - ExampleObjectTuple tree = (ExampleObjectTuple) copy(); + public ExampleTuple treeCopyNoTransform() { + ExampleTuple tree = (ExampleTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; @@ -130,8 +131,8 @@ public class ExampleObjectTuple extends ExamplesTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:95 */ - public ExampleObjectTuple treeCopy() { - ExampleObjectTuple tree = (ExampleObjectTuple) copy(); + public ExampleTuple treeCopy() { + ExampleTuple tree = (ExampleTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); @@ -147,27 +148,27 @@ public class ExampleObjectTuple extends ExamplesTuple implements Cloneable { * @declaredat ASTNode:109 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((ExampleObjectTuple) node).tokenString_Name); + return super.is$Equal(node) && (tokenString_Key == ((ExampleTuple) node).tokenString_Key); } /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. + * Replaces the lexeme Key. + * @param value The new value for the lexeme Key. * @apilevel high-level */ - public void setName(String value) { - tokenString_Name = value; + public void setKey(String value) { + tokenString_Key = value; } /** @apilevel internal */ - protected String tokenString_Name; + protected String tokenString_Key; /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. + * Retrieves the value for the lexeme Key. + * @return The value for the lexeme Key. * @apilevel high-level */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; + @ASTNodeAnnotation.Token(name="Key") + public String getKey() { + return tokenString_Key != null ? tokenString_Key : ""; } /** * Replaces the ExampleObject child. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExamplesTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExamplesTuple.java deleted file mode 100644 index 3806ea9d23ccd6483b5479da5e9d6d814856b235..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExamplesTuple.java +++ /dev/null @@ -1,100 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:39 - * @astdecl ExamplesTuple : ASTNode; - * @production ExamplesTuple : {@link ASTNode}; - - */ -public abstract class ExamplesTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ExamplesTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** @apilevel low-level - * @declaredat ASTNode:13 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:19 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:23 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:27 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public ExamplesTuple clone() throws CloneNotSupportedException { - ExamplesTuple node = (ExamplesTuple) super.clone(); - return node; - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:42 - */ - @Deprecated - public abstract ExamplesTuple fullCopy(); - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:50 - */ - public abstract ExamplesTuple treeCopyNoTransform(); - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:58 - */ - public abstract ExamplesTuple treeCopy(); - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Expression.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Expression.java index 5418a4b7e6d2ada669282b01dc7bbc2afccf93fa..90cdf94edab2d03f3a354eafb9eee38edcff95f6 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Expression.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Expression.java @@ -4,14 +4,15 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:113 - * @astdecl Expression : ASTNode ::= <Name:String> PathItemObject; - * @production Expression : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component">{@link PathItemObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:74 + * @astdecl Expression : ASTNode ::= <Name:String> PathItem; + * @production Expression : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component">{@link PathItem}</span>; */ public class Expression extends ASTNode<ASTNode> implements Cloneable { @@ -35,11 +36,11 @@ public class Expression extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "PathItemObject"}, - type = {"String", "PathItemObject"}, + name = {"Name", "PathItem"}, + type = {"String", "PathItem"}, kind = {"Token", "Child"} ) - public Expression(String p0, PathItemObject p1) { + public Expression(String p0, PathItem p1) { setName(p0); setChild(p1, 0); } @@ -170,30 +171,30 @@ public class Expression extends ASTNode<ASTNode> implements Cloneable { return tokenString_Name != null ? tokenString_Name : ""; } /** - * Replaces the PathItemObject child. - * @param node The new node to replace the PathItemObject child. + * Replaces the PathItem child. + * @param node The new node to replace the PathItem child. * @apilevel high-level */ - public void setPathItemObject(PathItemObject node) { + public void setPathItem(PathItem node) { setChild(node, 0); } /** - * Retrieves the PathItemObject child. - * @return The current node used as the PathItemObject child. + * Retrieves the PathItem child. + * @return The current node used as the PathItem child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="PathItemObject") - public PathItemObject getPathItemObject() { - return (PathItemObject) getChild(0); + @ASTNodeAnnotation.Child(name="PathItem") + public PathItem getPathItem() { + return (PathItem) getChild(0); } /** - * Retrieves the PathItemObject child. + * Retrieves the PathItem child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the PathItemObject child. + * @return The current node used as the PathItem child. * @apilevel low-level */ - public PathItemObject getPathItemObjectNoTransform() { - return (PathItemObject) getChildNoTransform(0); + public PathItem getPathItemNoTransform() { + return (PathItem) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkReferenceTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Extension.java similarity index 63% rename from src/gen/java/de/tudresden/inf/st/openapi/ast/LinkReferenceTuple.java rename to src/gen/java/de/tudresden/inf/st/openapi/ast/Extension.java index 17ab881af4a35465cad6d22f0749cbbce8be4cae..8d54a4db13039052b41768cf50c57f77149b4a36 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkReferenceTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Extension.java @@ -4,21 +4,22 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:53 - * @astdecl LinkReferenceTuple : LinksTuple ::= <Name:String> <Ref:String>; - * @production LinkReferenceTuple : {@link LinksTuple} ::= <span class="component"><Name:String></span> <span class="component"><Ref:String></span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:75 + * @astdecl Extension : ASTNode ::= <Key:String> <Value:Object>; + * @production Extension : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component"><Value:Object></span>; */ -public class LinkReferenceTuple extends LinksTuple implements Cloneable { +public class Extension extends ASTNode<ASTNode> implements Cloneable { /** * @declaredat ASTNode:1 */ - public LinkReferenceTuple() { + public Extension() { super(); } /** @@ -34,13 +35,13 @@ public class LinkReferenceTuple extends LinksTuple implements Cloneable { * @declaredat ASTNode:12 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "Ref"}, - type = {"String", "String"}, + name = {"Key", "Value"}, + type = {"String", "Object"}, kind = {"Token", "Token"} ) - public LinkReferenceTuple(String p0, String p1) { - setName(p0); - setRef(p1); + public Extension(String p0, Object p1) { + setKey(p0); + setValue(p1); } /** @apilevel low-level * @declaredat ASTNode:22 @@ -70,16 +71,16 @@ public class LinkReferenceTuple extends LinksTuple implements Cloneable { /** @apilevel internal * @declaredat ASTNode:40 */ - public LinkReferenceTuple clone() throws CloneNotSupportedException { - LinkReferenceTuple node = (LinkReferenceTuple) super.clone(); + public Extension clone() throws CloneNotSupportedException { + Extension node = (Extension) super.clone(); return node; } /** @apilevel internal * @declaredat ASTNode:45 */ - public LinkReferenceTuple copy() { + public Extension copy() { try { - LinkReferenceTuple node = (LinkReferenceTuple) clone(); + Extension node = (Extension) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); @@ -98,7 +99,7 @@ public class LinkReferenceTuple extends LinksTuple implements Cloneable { * @declaredat ASTNode:64 */ @Deprecated - public LinkReferenceTuple fullCopy() { + public Extension fullCopy() { return treeCopyNoTransform(); } /** @@ -108,8 +109,8 @@ public class LinkReferenceTuple extends LinksTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:74 */ - public LinkReferenceTuple treeCopyNoTransform() { - LinkReferenceTuple tree = (LinkReferenceTuple) copy(); + public Extension treeCopyNoTransform() { + Extension tree = (Extension) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; @@ -129,8 +130,8 @@ public class LinkReferenceTuple extends LinksTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:94 */ - public LinkReferenceTuple treeCopy() { - LinkReferenceTuple tree = (LinkReferenceTuple) copy(); + public Extension treeCopy() { + Extension tree = (Extension) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); @@ -146,47 +147,47 @@ public class LinkReferenceTuple extends LinksTuple implements Cloneable { * @declaredat ASTNode:108 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((LinkReferenceTuple) node).tokenString_Name) && (tokenString_Ref == ((LinkReferenceTuple) node).tokenString_Ref); + return super.is$Equal(node) && (tokenString_Key == ((Extension) node).tokenString_Key) && (tokenObject_Value == ((Extension) node).tokenObject_Value); } /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. + * Replaces the lexeme Key. + * @param value The new value for the lexeme Key. * @apilevel high-level */ - public void setName(String value) { - tokenString_Name = value; + public void setKey(String value) { + tokenString_Key = value; } /** @apilevel internal */ - protected String tokenString_Name; + protected String tokenString_Key; /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. + * Retrieves the value for the lexeme Key. + * @return The value for the lexeme Key. * @apilevel high-level */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; + @ASTNodeAnnotation.Token(name="Key") + public String getKey() { + return tokenString_Key != null ? tokenString_Key : ""; } /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. + * Replaces the lexeme Value. + * @param value The new value for the lexeme Value. * @apilevel high-level */ - public void setRef(String value) { - tokenString_Ref = value; + public void setValue(Object value) { + tokenObject_Value = value; } /** @apilevel internal */ - protected String tokenString_Ref; + protected Object tokenObject_Value; /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. + * Retrieves the value for the lexeme Value. + * @return The value for the lexeme Value. * @apilevel high-level */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; + @ASTNodeAnnotation.Token(name="Value") + public Object getValue() { + return tokenObject_Value; } /** @apilevel internal */ public ASTNode rewriteTo() { diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocObject.java new file mode 100644 index 0000000000000000000000000000000000000000..caff196d9178d5f79c0352e3478213180b05b19d --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocObject.java @@ -0,0 +1,352 @@ +/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ +package de.tudresden.inf.st.openapi.ast; +import org.openapi4j.core.exception.ResolutionException; +import org.openapi4j.core.validation.ValidationException; +import org.openapi4j.parser.model.v3.*; +import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; +import java.io.IOException; +import java.util.*; +import java.net.URL; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:53 + * @astdecl ExternalDocObject : ASTNode ::= <Description:String> <Url:String> Extension*; + * @production ExternalDocObject : {@link ASTNode} ::= <span class="component"><Description:String></span> <span class="component"><Url:String></span> <span class="component">{@link Extension}*</span>; + + */ +public class ExternalDocObject extends ASTNode<ASTNode> implements Cloneable { + /** + * @aspect Composer + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:338 + */ + public static ExternalDocs composeExternalDocs (ExternalDocObject externalDocObject){ + ExternalDocs externalDocs = new ExternalDocs(); + + if( !externalDocObject.getDescription().isEmpty() ) + externalDocs.setDescription(externalDocObject.getDescription()); + if( !externalDocObject.getUrl().isEmpty() ) + externalDocs.setUrl(externalDocObject.getUrl()); + if( externalDocObject.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : externalDocObject.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + externalDocs.setExtensions(extensionMap); + } + + return externalDocs; + } + /** + * @aspect Parser + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:376 + */ + public static ExternalDocObject parseExternalDocs(ExternalDocs externalDocs){ + ExternalDocObject externalDocObject = new ExternalDocObject(); + + + if( externalDocs.getDescription() != null ) + externalDocObject.setDescription(externalDocs.getDescription()); + if( externalDocs.getUrl() != null ) + externalDocObject.setUrl(externalDocObject.getUrl()); + if( externalDocs.getExtensions() != null ) { + for( String key : externalDocs.getExtensions().keySet() ) + externalDocObject.addExtension(new Extension(key, externalDocs.getExtensions().get(key))); + } + + return externalDocObject; + } + /** + * @declaredat ASTNode:1 + */ + public ExternalDocObject() { + super(); + } + /** + * Initializes the child array to the correct size. + * Initializes List and Opt nta children. + * @apilevel internal + * @ast method + * @declaredat ASTNode:10 + */ + public void init$Children() { + children = new ASTNode[1]; + setChild(new JastAddList(), 0); + } + /** + * @declaredat ASTNode:14 + */ + @ASTNodeAnnotation.Constructor( + name = {"Description", "Url", "Extension"}, + type = {"String", "String", "JastAddList<Extension>"}, + kind = {"Token", "Token", "List"} + ) + public ExternalDocObject(String p0, String p1, JastAddList<Extension> p2) { + setDescription(p0); + setUrl(p1); + setChild(p2, 0); + } + /** @apilevel low-level + * @declaredat ASTNode:25 + */ + protected int numChildren() { + return 1; + } + /** + * @apilevel internal + * @declaredat ASTNode:31 + */ + public boolean mayHaveRewrite() { + return false; + } + /** @apilevel internal + * @declaredat ASTNode:35 + */ + public void flushAttrCache() { + super.flushAttrCache(); + } + /** @apilevel internal + * @declaredat ASTNode:39 + */ + public void flushCollectionCache() { + super.flushCollectionCache(); + } + /** @apilevel internal + * @declaredat ASTNode:43 + */ + public ExternalDocObject clone() throws CloneNotSupportedException { + ExternalDocObject node = (ExternalDocObject) super.clone(); + return node; + } + /** @apilevel internal + * @declaredat ASTNode:48 + */ + public ExternalDocObject copy() { + try { + ExternalDocObject node = (ExternalDocObject) clone(); + node.parent = null; + if (children != null) { + node.children = (ASTNode[]) children.clone(); + } + return node; + } catch (CloneNotSupportedException e) { + throw new Error("Error: clone not supported for " + getClass().getName()); + } + } + /** + * Create a deep copy of the AST subtree at this node. + * The copy is dangling, i.e. has no parent. + * @return dangling copy of the subtree at this node + * @apilevel low-level + * @deprecated Please use treeCopy or treeCopyNoTransform instead + * @declaredat ASTNode:67 + */ + @Deprecated + public ExternalDocObject fullCopy() { + return treeCopyNoTransform(); + } + /** + * Create a deep copy of the AST subtree at this node. + * The copy is dangling, i.e. has no parent. + * @return dangling copy of the subtree at this node + * @apilevel low-level + * @declaredat ASTNode:77 + */ + public ExternalDocObject treeCopyNoTransform() { + ExternalDocObject tree = (ExternalDocObject) copy(); + if (children != null) { + for (int i = 0; i < children.length; ++i) { + ASTNode child = (ASTNode) children[i]; + if (child != null) { + child = child.treeCopyNoTransform(); + tree.setChild(child, i); + } + } + } + return tree; + } + /** + * Create a deep copy of the AST subtree at this node. + * The subtree of this node is traversed to trigger rewrites before copy. + * The copy is dangling, i.e. has no parent. + * @return dangling copy of the subtree at this node + * @apilevel low-level + * @declaredat ASTNode:97 + */ + public ExternalDocObject treeCopy() { + ExternalDocObject tree = (ExternalDocObject) copy(); + if (children != null) { + for (int i = 0; i < children.length; ++i) { + ASTNode child = (ASTNode) getChild(i); + if (child != null) { + child = child.treeCopy(); + tree.setChild(child, i); + } + } + } + return tree; + } + /** @apilevel internal + * @declaredat ASTNode:111 + */ + protected boolean is$Equal(ASTNode node) { + return super.is$Equal(node) && (tokenString_Description == ((ExternalDocObject) node).tokenString_Description) && (tokenString_Url == ((ExternalDocObject) node).tokenString_Url); + } + /** + * Replaces the lexeme Description. + * @param value The new value for the lexeme Description. + * @apilevel high-level + */ + public void setDescription(String value) { + tokenString_Description = value; + } + /** @apilevel internal + */ + protected String tokenString_Description; + /** + * Retrieves the value for the lexeme Description. + * @return The value for the lexeme Description. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="Description") + public String getDescription() { + return tokenString_Description != null ? tokenString_Description : ""; + } + /** + * Replaces the lexeme Url. + * @param value The new value for the lexeme Url. + * @apilevel high-level + */ + public void setUrl(String value) { + tokenString_Url = value; + } + /** @apilevel internal + */ + protected String tokenString_Url; + /** + * Retrieves the value for the lexeme Url. + * @return The value for the lexeme Url. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="Url") + public String getUrl() { + return tokenString_Url != null ? tokenString_Url : ""; + } + /** + * Replaces the Extension list. + * @param list The new list node to be used as the Extension list. + * @apilevel high-level + */ + public void setExtensionList(JastAddList<Extension> list) { + setChild(list, 0); + } + /** + * Retrieves the number of children in the Extension list. + * @return Number of children in the Extension list. + * @apilevel high-level + */ + public int getNumExtension() { + return getExtensionList().getNumChild(); + } + /** + * Retrieves the number of children in the Extension list. + * Calling this method will not trigger rewrites. + * @return Number of children in the Extension list. + * @apilevel low-level + */ + public int getNumExtensionNoTransform() { + return getExtensionListNoTransform().getNumChildNoTransform(); + } + /** + * Retrieves the element at index {@code i} in the Extension list. + * @param i Index of the element to return. + * @return The element at position {@code i} in the Extension list. + * @apilevel high-level + */ + public Extension getExtension(int i) { + return (Extension) getExtensionList().getChild(i); + } + /** + * Check whether the Extension list has any children. + * @return {@code true} if it has at least one child, {@code false} otherwise. + * @apilevel high-level + */ + public boolean hasExtension() { + return getExtensionList().getNumChild() != 0; + } + /** + * Append an element to the Extension list. + * @param node The element to append to the Extension list. + * @apilevel high-level + */ + public void addExtension(Extension node) { + JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); + list.addChild(node); + } + /** @apilevel low-level + */ + public void addExtensionNoTransform(Extension node) { + JastAddList<Extension> list = getExtensionListNoTransform(); + list.addChild(node); + } + /** + * Replaces the Extension list element at index {@code i} with the new node {@code node}. + * @param node The new node to replace the old list element. + * @param i The list index of the node to be replaced. + * @apilevel high-level + */ + public void setExtension(Extension node, int i) { + JastAddList<Extension> list = getExtensionList(); + list.setChild(node, i); + } + /** + * Retrieves the Extension list. + * @return The node representing the Extension list. + * @apilevel high-level + */ + @ASTNodeAnnotation.ListChild(name="Extension") + public JastAddList<Extension> getExtensionList() { + JastAddList<Extension> list = (JastAddList<Extension>) getChild(0); + return list; + } + /** + * Retrieves the Extension list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the Extension list. + * @apilevel low-level + */ + public JastAddList<Extension> getExtensionListNoTransform() { + return (JastAddList<Extension>) getChildNoTransform(0); + } + /** + * @return the element at index {@code i} in the Extension list without + * triggering rewrites. + */ + public Extension getExtensionNoTransform(int i) { + return (Extension) getExtensionListNoTransform().getChildNoTransform(i); + } + /** + * Retrieves the Extension list. + * @return The node representing the Extension list. + * @apilevel high-level + */ + public JastAddList<Extension> getExtensions() { + return getExtensionList(); + } + /** + * Retrieves the Extension list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the Extension list. + * @apilevel low-level + */ + public JastAddList<Extension> getExtensionsNoTransform() { + return getExtensionListNoTransform(); + } + /** @apilevel internal */ + public ASTNode rewriteTo() { + return super.rewriteTo(); + } + /** @apilevel internal */ + public boolean canRewrite() { + return false; + } +} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocumentationObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocumentationObject.java deleted file mode 100644 index 4a475c5010f2934797af2a07563878e29cae2b84..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocumentationObject.java +++ /dev/null @@ -1,225 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:7 - * @astdecl ExternalDocumentationObject : ASTNode ::= <Description:String> <Url:String>; - * @production ExternalDocumentationObject : {@link ASTNode} ::= <span class="component"><Description:String></span> <span class="component"><Url:String></span>; - - */ -public class ExternalDocumentationObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:330 - */ - public static ExternalDocs composeExternalDocs (ExternalDocumentationObject externalDocumentationObject){ - ExternalDocs externalDocs = new ExternalDocs(); - - if( !externalDocumentationObject.getDescription().isEmpty() ) - externalDocs.getDescription(); - externalDocs.setUrl( externalDocumentationObject.getUrl() ); - - return externalDocs; - } - /** - * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:402 - */ - public static ExternalDocumentationObject parseExternalDocs(ExternalDocs externalDocs){ - ExternalDocumentationObject externalDocumentationObject = new ExternalDocumentationObject(); - - if( externalDocs.getDescription() != null ) - externalDocumentationObject.setDescription( externalDocs.getDescription() ); - externalDocumentationObject.setUrl( externalDocs.getUrl() ); - - return externalDocumentationObject; - } - /** - * @declaredat ASTNode:1 - */ - public ExternalDocumentationObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Description", "Url"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public ExternalDocumentationObject(String p0, String p1) { - setDescription(p0); - setUrl(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public ExternalDocumentationObject clone() throws CloneNotSupportedException { - ExternalDocumentationObject node = (ExternalDocumentationObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public ExternalDocumentationObject copy() { - try { - ExternalDocumentationObject node = (ExternalDocumentationObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public ExternalDocumentationObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public ExternalDocumentationObject treeCopyNoTransform() { - ExternalDocumentationObject tree = (ExternalDocumentationObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public ExternalDocumentationObject treeCopy() { - ExternalDocumentationObject tree = (ExternalDocumentationObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Description == ((ExternalDocumentationObject) node).tokenString_Description) && (tokenString_Url == ((ExternalDocumentationObject) node).tokenString_Url); - } - /** - * Replaces the lexeme Description. - * @param value The new value for the lexeme Description. - * @apilevel high-level - */ - public void setDescription(String value) { - tokenString_Description = value; - } - /** @apilevel internal - */ - protected String tokenString_Description; - /** - * Retrieves the value for the lexeme Description. - * @return The value for the lexeme Description. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Description") - public String getDescription() { - return tokenString_Description != null ? tokenString_Description : ""; - } - /** - * Replaces the lexeme Url. - * @param value The new value for the lexeme Url. - * @apilevel high-level - */ - public void setUrl(String value) { - tokenString_Url = value; - } - /** @apilevel internal - */ - protected String tokenString_Url; - /** - * Retrieves the value for the lexeme Url. - * @return The value for the lexeme Url. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Url") - public String getUrl() { - return tokenString_Url != null ? tokenString_Url : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Flows.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Flows.java deleted file mode 100644 index 033a9506cfbe3510ae112047ee89a90cc82a809a..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Flows.java +++ /dev/null @@ -1,185 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:149 - * @astdecl Flows : ASTNode ::= OAuthFlowsObject; - * @production Flows : {@link ASTNode} ::= <span class="component">{@link OAuthFlowsObject}</span>; - - */ -public class Flows extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public Flows() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"OAuthFlowsObject"}, - type = {"OAuthFlowsObject"}, - kind = {"Child"} - ) - public Flows(OAuthFlowsObject p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public Flows clone() throws CloneNotSupportedException { - Flows node = (Flows) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public Flows copy() { - try { - Flows node = (Flows) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public Flows fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public Flows treeCopyNoTransform() { - Flows tree = (Flows) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public Flows treeCopy() { - Flows tree = (Flows) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the OAuthFlowsObject child. - * @param node The new node to replace the OAuthFlowsObject child. - * @apilevel high-level - */ - public void setOAuthFlowsObject(OAuthFlowsObject node) { - setChild(node, 0); - } - /** - * Retrieves the OAuthFlowsObject child. - * @return The current node used as the OAuthFlowsObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="OAuthFlowsObject") - public OAuthFlowsObject getOAuthFlowsObject() { - return (OAuthFlowsObject) getChild(0); - } - /** - * Retrieves the OAuthFlowsObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the OAuthFlowsObject child. - * @apilevel low-level - */ - public OAuthFlowsObject getOAuthFlowsObjectNoTransform() { - return (OAuthFlowsObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Get.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Get.java index 69506a6a5305afa69b0bb864b5ac45c46a9c85a1..d4dff89a15da48df316e38cc90b79cd4022a10a1 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Get.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Get.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:64 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:39 * @astdecl Get : ASTNode ::= OperationObject; * @production Get : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/HTTPStatusCode.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HTTPStatusCode.java deleted file mode 100644 index 5dd0857697e74cead7f4939c2828aff0a78514fd..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/HTTPStatusCode.java +++ /dev/null @@ -1,100 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:104 - * @astdecl HTTPStatusCode : ASTNode; - * @production HTTPStatusCode : {@link ASTNode}; - - */ -public abstract class HTTPStatusCode extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public HTTPStatusCode() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** @apilevel low-level - * @declaredat ASTNode:13 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:19 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:23 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:27 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public HTTPStatusCode clone() throws CloneNotSupportedException { - HTTPStatusCode node = (HTTPStatusCode) super.clone(); - return node; - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:42 - */ - @Deprecated - public abstract HTTPStatusCode fullCopy(); - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:50 - */ - public abstract HTTPStatusCode treeCopyNoTransform(); - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:58 - */ - public abstract HTTPStatusCode treeCopy(); - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/HTTPStatusCodeReference.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HTTPStatusCodeReference.java deleted file mode 100644 index 502883bd5aef8b063460072bd6ae53ad6d22ccfe..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/HTTPStatusCodeReference.java +++ /dev/null @@ -1,199 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:106 - * @astdecl HTTPStatusCodeReference : HTTPStatusCode ::= <Name:String> <Ref:String>; - * @production HTTPStatusCodeReference : {@link HTTPStatusCode} ::= <span class="component"><Name:String></span> <span class="component"><Ref:String></span>; - - */ -public class HTTPStatusCodeReference extends HTTPStatusCode implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public HTTPStatusCodeReference() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Ref"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public HTTPStatusCodeReference(String p0, String p1) { - setName(p0); - setRef(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public HTTPStatusCodeReference clone() throws CloneNotSupportedException { - HTTPStatusCodeReference node = (HTTPStatusCodeReference) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public HTTPStatusCodeReference copy() { - try { - HTTPStatusCodeReference node = (HTTPStatusCodeReference) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public HTTPStatusCodeReference fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public HTTPStatusCodeReference treeCopyNoTransform() { - HTTPStatusCodeReference tree = (HTTPStatusCodeReference) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public HTTPStatusCodeReference treeCopy() { - HTTPStatusCodeReference tree = (HTTPStatusCodeReference) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((HTTPStatusCodeReference) node).tokenString_Name) && (tokenString_Ref == ((HTTPStatusCodeReference) node).tokenString_Ref); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Head.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Head.java index c43eb60a19d2b84ef3ff571d45e5a5171225b5de..6591190ffa7957f6ed9cbdaa76bdd0fd8a6c87de 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Head.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Head.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:69 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:44 * @astdecl Head : ASTNode ::= OperationObject; * @production Head : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObject.java index f8f0be82b5c73650ab70e21d27c25ba073e62c37..5b3e9990fe003aa17d442c789fcca65e1d46d9c0 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObject.java @@ -4,20 +4,21 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:123 - * @astdecl HeaderObject : ASTNode ::= <Description:String> <Required:boolean> <DeprecatedBoolean:Object> <AllowEmptyValue:Object> <Style:String> <Explode:Object> <AllowReserved:Object> [SchemaObject] <Example:Object> ExamplesTuple* ContentTuple*; - * @production HeaderObject : {@link ASTNode} ::= <span class="component"><Description:String></span> <span class="component"><Required:boolean></span> <span class="component"><DeprecatedBoolean:Object></span> <span class="component"><AllowEmptyValue:Object></span> <span class="component"><Style:String></span> <span class="component"><Explode:Object></span> <span class="component"><AllowReserved:Object></span> <span class="component">[{@link SchemaObject}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExamplesTuple}*</span> <span class="component">{@link ContentTuple}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:85 + * @astdecl HeaderObject : ASTNode ::= <Description:String> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style:String> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExampleTuple* ContentTuple* <Ref:String>; + * @production HeaderObject : {@link ASTNode} ::= <span class="component"><Description:String></span> <span class="component"><Required:Boolean></span> <span class="component"><DeprecatedBoolean:Boolean></span> <span class="component"><AllowEmptyValue:Boolean></span> <span class="component"><Style:String></span> <span class="component"><Explode:Boolean></span> <span class="component"><AllowReserved:Boolean></span> <span class="component">[{@link SchemaObject}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component"><Ref:String></span>; */ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:520 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:545 */ public static Header composeHeader (HeaderObject headerObject){ Header header = new Header(); @@ -26,32 +27,34 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { if( !headerObject.getDescription().isEmpty() ) header.setDescription( headerObject.getDescription() ); - if( headerObject.getStyle() != null ) + if( !headerObject.getStyle().isEmpty() ) header.setStyle(headerObject.getStyle()); if( headerObject.getExplode() != null ) - header.setExplode((boolean)headerObject.getExplode()); + header.setExplode(headerObject.getExplode()); if( headerObject.getAllowReserved() != null ) - header.setAllowReserved((boolean)headerObject.getAllowReserved()); + header.setAllowReserved(headerObject.getAllowReserved()); if( headerObject.getExample() != null ) header.setExample(headerObject.getExample()); - if( headerObject.getNumExamplesTuple() != 0 ){ + if( headerObject.getNumExampleTuple() != 0 ){ Map<String, Example> examples = new HashMap<>(); - for( ExamplesTuple t : headerObject.getExamplesTuples() ) - examples.put( ((ExampleObjectTuple)t).getName(), ExampleObject.composeExample( ((ExampleObjectTuple)t).getExampleObject() ) ); + for( ExampleTuple t : headerObject.getExampleTuples() ) + examples.put(t.getKey(), ExampleObject.composeExample(t.getExampleObject())); header.setExample(examples); } if( headerObject.getNumContentTuple() != 0 ){ Map<String, MediaType> contents = new HashMap<>(); for( ContentTuple t : headerObject.getContentTuples() ) - contents.put( ((ContentObjectTuple)t).getName(), MediaTypeObject.composeMediaType( ((ContentObjectTuple)t).getMediaTypeObject() ) ); + contents.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); header.setContentMediaTypes(contents); } + if( headerObject.hasSchemaObject() ) + header.setSchema(SchemaObject.composeSchema(headerObject.getSchemaObject())); return header; } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:576 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:556 */ public static HeaderObject parseHeader(Header header){ HeaderObject headerObject = new HeaderObject(); @@ -72,12 +75,14 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { headerObject.setExample( header.getExample() ); if( header.getExamples() != null ){ for( String key : header.getExamples().keySet() ) - headerObject.addExamplesTuple(new ExampleObjectTuple(key, ExampleObject.parseExample(header.getExample(key)))); + headerObject.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(header.getExample(key)))); } if( header.getContentMediaTypes() != null ){ for( String key : header.getContentMediaTypes().keySet() ) - headerObject.addContentTuple(new ContentObjectTuple(key, MediaTypeObject.parseMediaType(header.getContentMediaType(key)))); + headerObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(header.getContentMediaType(key)))); } + if( header.getSchema() != null ) + headerObject.setSchemaObject(SchemaObject.parseSchema(header.getSchema())); return headerObject; } @@ -104,11 +109,11 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:16 */ @ASTNodeAnnotation.Constructor( - name = {"Description", "Required", "DeprecatedBoolean", "AllowEmptyValue", "Style", "Explode", "AllowReserved", "SchemaObject", "Example", "ExamplesTuple", "ContentTuple"}, - type = {"String", "boolean", "Object", "Object", "String", "Object", "Object", "Opt<SchemaObject>", "Object", "JastAddList<ExamplesTuple>", "JastAddList<ContentTuple>"}, - kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "List", "List"} + name = {"Description", "Required", "DeprecatedBoolean", "AllowEmptyValue", "Style", "Explode", "AllowReserved", "SchemaObject", "Example", "ExampleTuple", "ContentTuple", "Ref"}, + type = {"String", "Boolean", "Boolean", "Boolean", "String", "Boolean", "Boolean", "Opt<SchemaObject>", "Object", "JastAddList<ExampleTuple>", "JastAddList<ContentTuple>", "String"}, + kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "List", "List", "Token"} ) - public HeaderObject(String p0, boolean p1, Object p2, Object p3, String p4, Object p5, Object p6, Opt<SchemaObject> p7, Object p8, JastAddList<ExamplesTuple> p9, JastAddList<ContentTuple> p10) { + public HeaderObject(String p0, Boolean p1, Boolean p2, Boolean p3, String p4, Boolean p5, Boolean p6, Opt<SchemaObject> p7, Object p8, JastAddList<ExampleTuple> p9, JastAddList<ContentTuple> p10, String p11) { setDescription(p0); setRequired(p1); setDeprecatedBoolean(p2); @@ -120,41 +125,42 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { setExample(p8); setChild(p9, 1); setChild(p10, 2); + setRef(p11); } /** @apilevel low-level - * @declaredat ASTNode:35 + * @declaredat ASTNode:36 */ protected int numChildren() { return 3; } /** * @apilevel internal - * @declaredat ASTNode:41 + * @declaredat ASTNode:42 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:45 + * @declaredat ASTNode:46 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:49 + * @declaredat ASTNode:50 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:53 + * @declaredat ASTNode:54 */ public HeaderObject clone() throws CloneNotSupportedException { HeaderObject node = (HeaderObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:58 + * @declaredat ASTNode:59 */ public HeaderObject copy() { try { @@ -174,7 +180,7 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:77 + * @declaredat ASTNode:78 */ @Deprecated public HeaderObject fullCopy() { @@ -185,7 +191,7 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:87 + * @declaredat ASTNode:88 */ public HeaderObject treeCopyNoTransform() { HeaderObject tree = (HeaderObject) copy(); @@ -206,7 +212,7 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:107 + * @declaredat ASTNode:108 */ public HeaderObject treeCopy() { HeaderObject tree = (HeaderObject) copy(); @@ -222,10 +228,10 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:121 + * @declaredat ASTNode:122 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Description == ((HeaderObject) node).tokenString_Description) && (tokenboolean_Required == ((HeaderObject) node).tokenboolean_Required) && (tokenObject_DeprecatedBoolean == ((HeaderObject) node).tokenObject_DeprecatedBoolean) && (tokenObject_AllowEmptyValue == ((HeaderObject) node).tokenObject_AllowEmptyValue) && (tokenString_Style == ((HeaderObject) node).tokenString_Style) && (tokenObject_Explode == ((HeaderObject) node).tokenObject_Explode) && (tokenObject_AllowReserved == ((HeaderObject) node).tokenObject_AllowReserved) && (tokenObject_Example == ((HeaderObject) node).tokenObject_Example); + return super.is$Equal(node) && (tokenString_Description == ((HeaderObject) node).tokenString_Description) && (tokenBoolean_Required == ((HeaderObject) node).tokenBoolean_Required) && (tokenBoolean_DeprecatedBoolean == ((HeaderObject) node).tokenBoolean_DeprecatedBoolean) && (tokenBoolean_AllowEmptyValue == ((HeaderObject) node).tokenBoolean_AllowEmptyValue) && (tokenString_Style == ((HeaderObject) node).tokenString_Style) && (tokenBoolean_Explode == ((HeaderObject) node).tokenBoolean_Explode) && (tokenBoolean_AllowReserved == ((HeaderObject) node).tokenBoolean_AllowReserved) && (tokenObject_Example == ((HeaderObject) node).tokenObject_Example) && (tokenString_Ref == ((HeaderObject) node).tokenString_Ref); } /** * Replaces the lexeme Description. @@ -252,60 +258,60 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { * @param value The new value for the lexeme Required. * @apilevel high-level */ - public void setRequired(boolean value) { - tokenboolean_Required = value; + public void setRequired(Boolean value) { + tokenBoolean_Required = value; } /** @apilevel internal */ - protected boolean tokenboolean_Required; + protected Boolean tokenBoolean_Required; /** * Retrieves the value for the lexeme Required. * @return The value for the lexeme Required. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="Required") - public boolean getRequired() { - return tokenboolean_Required; + public Boolean getRequired() { + return tokenBoolean_Required; } /** * Replaces the lexeme DeprecatedBoolean. * @param value The new value for the lexeme DeprecatedBoolean. * @apilevel high-level */ - public void setDeprecatedBoolean(Object value) { - tokenObject_DeprecatedBoolean = value; + public void setDeprecatedBoolean(Boolean value) { + tokenBoolean_DeprecatedBoolean = value; } /** @apilevel internal */ - protected Object tokenObject_DeprecatedBoolean; + protected Boolean tokenBoolean_DeprecatedBoolean; /** * Retrieves the value for the lexeme DeprecatedBoolean. * @return The value for the lexeme DeprecatedBoolean. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="DeprecatedBoolean") - public Object getDeprecatedBoolean() { - return tokenObject_DeprecatedBoolean; + public Boolean getDeprecatedBoolean() { + return tokenBoolean_DeprecatedBoolean; } /** * Replaces the lexeme AllowEmptyValue. * @param value The new value for the lexeme AllowEmptyValue. * @apilevel high-level */ - public void setAllowEmptyValue(Object value) { - tokenObject_AllowEmptyValue = value; + public void setAllowEmptyValue(Boolean value) { + tokenBoolean_AllowEmptyValue = value; } /** @apilevel internal */ - protected Object tokenObject_AllowEmptyValue; + protected Boolean tokenBoolean_AllowEmptyValue; /** * Retrieves the value for the lexeme AllowEmptyValue. * @return The value for the lexeme AllowEmptyValue. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="AllowEmptyValue") - public Object getAllowEmptyValue() { - return tokenObject_AllowEmptyValue; + public Boolean getAllowEmptyValue() { + return tokenBoolean_AllowEmptyValue; } /** * Replaces the lexeme Style. @@ -332,40 +338,40 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { * @param value The new value for the lexeme Explode. * @apilevel high-level */ - public void setExplode(Object value) { - tokenObject_Explode = value; + public void setExplode(Boolean value) { + tokenBoolean_Explode = value; } /** @apilevel internal */ - protected Object tokenObject_Explode; + protected Boolean tokenBoolean_Explode; /** * Retrieves the value for the lexeme Explode. * @return The value for the lexeme Explode. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="Explode") - public Object getExplode() { - return tokenObject_Explode; + public Boolean getExplode() { + return tokenBoolean_Explode; } /** * Replaces the lexeme AllowReserved. * @param value The new value for the lexeme AllowReserved. * @apilevel high-level */ - public void setAllowReserved(Object value) { - tokenObject_AllowReserved = value; + public void setAllowReserved(Boolean value) { + tokenBoolean_AllowReserved = value; } /** @apilevel internal */ - protected Object tokenObject_AllowReserved; + protected Boolean tokenBoolean_AllowReserved; /** * Retrieves the value for the lexeme AllowReserved. * @return The value for the lexeme AllowReserved. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="AllowReserved") - public Object getAllowReserved() { - return tokenObject_AllowReserved; + public Boolean getAllowReserved() { + return tokenBoolean_AllowReserved; } /** * Replaces the optional node for the SchemaObject child. This is the <code>Opt</code> @@ -439,114 +445,114 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { return tokenObject_Example; } /** - * Replaces the ExamplesTuple list. - * @param list The new list node to be used as the ExamplesTuple list. + * Replaces the ExampleTuple list. + * @param list The new list node to be used as the ExampleTuple list. * @apilevel high-level */ - public void setExamplesTupleList(JastAddList<ExamplesTuple> list) { + public void setExampleTupleList(JastAddList<ExampleTuple> list) { setChild(list, 1); } /** - * Retrieves the number of children in the ExamplesTuple list. - * @return Number of children in the ExamplesTuple list. + * Retrieves the number of children in the ExampleTuple list. + * @return Number of children in the ExampleTuple list. * @apilevel high-level */ - public int getNumExamplesTuple() { - return getExamplesTupleList().getNumChild(); + public int getNumExampleTuple() { + return getExampleTupleList().getNumChild(); } /** - * Retrieves the number of children in the ExamplesTuple list. + * Retrieves the number of children in the ExampleTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the ExamplesTuple list. + * @return Number of children in the ExampleTuple list. * @apilevel low-level */ - public int getNumExamplesTupleNoTransform() { - return getExamplesTupleListNoTransform().getNumChildNoTransform(); + public int getNumExampleTupleNoTransform() { + return getExampleTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the ExamplesTuple list. + * Retrieves the element at index {@code i} in the ExampleTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the ExamplesTuple list. + * @return The element at position {@code i} in the ExampleTuple list. * @apilevel high-level */ - public ExamplesTuple getExamplesTuple(int i) { - return (ExamplesTuple) getExamplesTupleList().getChild(i); + public ExampleTuple getExampleTuple(int i) { + return (ExampleTuple) getExampleTupleList().getChild(i); } /** - * Check whether the ExamplesTuple list has any children. + * Check whether the ExampleTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasExamplesTuple() { - return getExamplesTupleList().getNumChild() != 0; + public boolean hasExampleTuple() { + return getExampleTupleList().getNumChild() != 0; } /** - * Append an element to the ExamplesTuple list. - * @param node The element to append to the ExamplesTuple list. + * Append an element to the ExampleTuple list. + * @param node The element to append to the ExampleTuple list. * @apilevel high-level */ - public void addExamplesTuple(ExamplesTuple node) { - JastAddList<ExamplesTuple> list = (parent == null) ? getExamplesTupleListNoTransform() : getExamplesTupleList(); + public void addExampleTuple(ExampleTuple node) { + JastAddList<ExampleTuple> list = (parent == null) ? getExampleTupleListNoTransform() : getExampleTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addExamplesTupleNoTransform(ExamplesTuple node) { - JastAddList<ExamplesTuple> list = getExamplesTupleListNoTransform(); + public void addExampleTupleNoTransform(ExampleTuple node) { + JastAddList<ExampleTuple> list = getExampleTupleListNoTransform(); list.addChild(node); } /** - * Replaces the ExamplesTuple list element at index {@code i} with the new node {@code node}. + * Replaces the ExampleTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setExamplesTuple(ExamplesTuple node, int i) { - JastAddList<ExamplesTuple> list = getExamplesTupleList(); + public void setExampleTuple(ExampleTuple node, int i) { + JastAddList<ExampleTuple> list = getExampleTupleList(); list.setChild(node, i); } /** - * Retrieves the ExamplesTuple list. - * @return The node representing the ExamplesTuple list. + * Retrieves the ExampleTuple list. + * @return The node representing the ExampleTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="ExamplesTuple") - public JastAddList<ExamplesTuple> getExamplesTupleList() { - JastAddList<ExamplesTuple> list = (JastAddList<ExamplesTuple>) getChild(1); + @ASTNodeAnnotation.ListChild(name="ExampleTuple") + public JastAddList<ExampleTuple> getExampleTupleList() { + JastAddList<ExampleTuple> list = (JastAddList<ExampleTuple>) getChild(1); return list; } /** - * Retrieves the ExamplesTuple list. + * Retrieves the ExampleTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExamplesTuple list. + * @return The node representing the ExampleTuple list. * @apilevel low-level */ - public JastAddList<ExamplesTuple> getExamplesTupleListNoTransform() { - return (JastAddList<ExamplesTuple>) getChildNoTransform(1); + public JastAddList<ExampleTuple> getExampleTupleListNoTransform() { + return (JastAddList<ExampleTuple>) getChildNoTransform(1); } /** - * @return the element at index {@code i} in the ExamplesTuple list without + * @return the element at index {@code i} in the ExampleTuple list without * triggering rewrites. */ - public ExamplesTuple getExamplesTupleNoTransform(int i) { - return (ExamplesTuple) getExamplesTupleListNoTransform().getChildNoTransform(i); + public ExampleTuple getExampleTupleNoTransform(int i) { + return (ExampleTuple) getExampleTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the ExamplesTuple list. - * @return The node representing the ExamplesTuple list. + * Retrieves the ExampleTuple list. + * @return The node representing the ExampleTuple list. * @apilevel high-level */ - public JastAddList<ExamplesTuple> getExamplesTuples() { - return getExamplesTupleList(); + public JastAddList<ExampleTuple> getExampleTuples() { + return getExampleTupleList(); } /** - * Retrieves the ExamplesTuple list. + * Retrieves the ExampleTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExamplesTuple list. + * @return The node representing the ExampleTuple list. * @apilevel low-level */ - public JastAddList<ExamplesTuple> getExamplesTuplesNoTransform() { - return getExamplesTupleListNoTransform(); + public JastAddList<ExampleTuple> getExampleTuplesNoTransform() { + return getExampleTupleListNoTransform(); } /** * Replaces the ContentTuple list. @@ -658,6 +664,26 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { public JastAddList<ContentTuple> getContentTuplesNoTransform() { return getContentTupleListNoTransform(); } + /** + * Replaces the lexeme Ref. + * @param value The new value for the lexeme Ref. + * @apilevel high-level + */ + public void setRef(String value) { + tokenString_Ref = value; + } + /** @apilevel internal + */ + protected String tokenString_Ref; + /** + * Retrieves the value for the lexeme Ref. + * @return The value for the lexeme Ref. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="Ref") + public String getRef() { + return tokenString_Ref != null ? tokenString_Ref : ""; + } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderReferenceTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderReferenceTuple.java deleted file mode 100644 index f65e5ed4f1603fba80dbdc629a63eb699672cac4..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderReferenceTuple.java +++ /dev/null @@ -1,199 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:47 - * @astdecl HeaderReferenceTuple : HeadersTuple ::= <Name:String> <Ref:String>; - * @production HeaderReferenceTuple : {@link HeadersTuple} ::= <span class="component"><Name:String></span> <span class="component"><Ref:String></span>; - - */ -public class HeaderReferenceTuple extends HeadersTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public HeaderReferenceTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Ref"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public HeaderReferenceTuple(String p0, String p1) { - setName(p0); - setRef(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public HeaderReferenceTuple clone() throws CloneNotSupportedException { - HeaderReferenceTuple node = (HeaderReferenceTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public HeaderReferenceTuple copy() { - try { - HeaderReferenceTuple node = (HeaderReferenceTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public HeaderReferenceTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public HeaderReferenceTuple treeCopyNoTransform() { - HeaderReferenceTuple tree = (HeaderReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public HeaderReferenceTuple treeCopy() { - HeaderReferenceTuple tree = (HeaderReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((HeaderReferenceTuple) node).tokenString_Name) && (tokenString_Ref == ((HeaderReferenceTuple) node).tokenString_Ref); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObjectTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderTuple.java similarity index 74% rename from src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObjectTuple.java rename to src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderTuple.java index 3a1d743abea43b1661f89f790d68a5b07adcb8a9..d9c2932425a4623d0a18a6b97958fdaa4f3fa581 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObjectTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderTuple.java @@ -4,21 +4,22 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:46 - * @astdecl HeaderObjectTuple : HeadersTuple ::= <Name:String> HeaderObject; - * @production HeaderObjectTuple : {@link HeadersTuple} ::= <span class="component"><Name:String></span> <span class="component">{@link HeaderObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:28 + * @astdecl HeaderTuple : ASTNode ::= <Key:String> HeaderObject; + * @production HeaderTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link HeaderObject}</span>; */ -public class HeaderObjectTuple extends HeadersTuple implements Cloneable { +public class HeaderTuple extends ASTNode<ASTNode> implements Cloneable { /** * @declaredat ASTNode:1 */ - public HeaderObjectTuple() { + public HeaderTuple() { super(); } /** @@ -35,12 +36,12 @@ public class HeaderObjectTuple extends HeadersTuple implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "HeaderObject"}, + name = {"Key", "HeaderObject"}, type = {"String", "HeaderObject"}, kind = {"Token", "Child"} ) - public HeaderObjectTuple(String p0, HeaderObject p1) { - setName(p0); + public HeaderTuple(String p0, HeaderObject p1) { + setKey(p0); setChild(p1, 0); } /** @apilevel low-level @@ -71,16 +72,16 @@ public class HeaderObjectTuple extends HeadersTuple implements Cloneable { /** @apilevel internal * @declaredat ASTNode:41 */ - public HeaderObjectTuple clone() throws CloneNotSupportedException { - HeaderObjectTuple node = (HeaderObjectTuple) super.clone(); + public HeaderTuple clone() throws CloneNotSupportedException { + HeaderTuple node = (HeaderTuple) super.clone(); return node; } /** @apilevel internal * @declaredat ASTNode:46 */ - public HeaderObjectTuple copy() { + public HeaderTuple copy() { try { - HeaderObjectTuple node = (HeaderObjectTuple) clone(); + HeaderTuple node = (HeaderTuple) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); @@ -99,7 +100,7 @@ public class HeaderObjectTuple extends HeadersTuple implements Cloneable { * @declaredat ASTNode:65 */ @Deprecated - public HeaderObjectTuple fullCopy() { + public HeaderTuple fullCopy() { return treeCopyNoTransform(); } /** @@ -109,8 +110,8 @@ public class HeaderObjectTuple extends HeadersTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:75 */ - public HeaderObjectTuple treeCopyNoTransform() { - HeaderObjectTuple tree = (HeaderObjectTuple) copy(); + public HeaderTuple treeCopyNoTransform() { + HeaderTuple tree = (HeaderTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; @@ -130,8 +131,8 @@ public class HeaderObjectTuple extends HeadersTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:95 */ - public HeaderObjectTuple treeCopy() { - HeaderObjectTuple tree = (HeaderObjectTuple) copy(); + public HeaderTuple treeCopy() { + HeaderTuple tree = (HeaderTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); @@ -147,27 +148,27 @@ public class HeaderObjectTuple extends HeadersTuple implements Cloneable { * @declaredat ASTNode:109 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((HeaderObjectTuple) node).tokenString_Name); + return super.is$Equal(node) && (tokenString_Key == ((HeaderTuple) node).tokenString_Key); } /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. + * Replaces the lexeme Key. + * @param value The new value for the lexeme Key. * @apilevel high-level */ - public void setName(String value) { - tokenString_Name = value; + public void setKey(String value) { + tokenString_Key = value; } /** @apilevel internal */ - protected String tokenString_Name; + protected String tokenString_Key; /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. + * Retrieves the value for the lexeme Key. + * @return The value for the lexeme Key. * @apilevel high-level */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; + @ASTNodeAnnotation.Token(name="Key") + public String getKey() { + return tokenString_Key != null ? tokenString_Key : ""; } /** * Replaces the HeaderObject child. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeadersTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeadersTuple.java deleted file mode 100644 index 1a064e3716777fe67554413139c304a15e5df49c..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeadersTuple.java +++ /dev/null @@ -1,100 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:45 - * @astdecl HeadersTuple : ASTNode; - * @production HeadersTuple : {@link ASTNode}; - - */ -public abstract class HeadersTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public HeadersTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** @apilevel low-level - * @declaredat ASTNode:13 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:19 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:23 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:27 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public HeadersTuple clone() throws CloneNotSupportedException { - HeadersTuple node = (HeadersTuple) super.clone(); - return node; - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:42 - */ - @Deprecated - public abstract HeadersTuple fullCopy(); - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:50 - */ - public abstract HeadersTuple treeCopyNoTransform(); - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:58 - */ - public abstract HeadersTuple treeCopy(); - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Implicit.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Implicit.java index b1062233e925a53e2b82fd6a265f884719568db3..a9ca8a3b82a4f4625b31e6298f4178c352eac974 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Implicit.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Implicit.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:153 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:114 * @astdecl Implicit : ASTNode ::= OAuthFlowObject; * @production Implicit : {@link ASTNode} ::= <span class="component">{@link OAuthFlowObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/InfoObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/InfoObject.java index 74dbcc96fa5e1a2b6abdaebc043f9c53abfefe09..b3344c3f7f9630ef60e0e75fc053cd0cfc62058c 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/InfoObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/InfoObject.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:10 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:5 * @astdecl InfoObject : ASTNode ::= <Title:String> <Description:String> <TermsOfService:String> [ContactObject] [LicenseObject] <Version:String>; * @production InfoObject : {@link ASTNode} ::= <span class="component"><Title:String></span> <span class="component"><Description:String></span> <span class="component"><TermsOfService:String></span> <span class="component">[{@link ContactObject}]</span> <span class="component">[{@link LicenseObject}]</span> <span class="component"><Version:String></span>; @@ -17,43 +18,45 @@ import java.net.URL; public class InfoObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:50 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:54 */ public static Info composeInfo (InfoObject infoObject){ Info info = new Info(); - info.setTitle( infoObject.getTitle() ); - info.setVersion( infoObject.getVersion() ); - + if( !infoObject.getTitle().isEmpty() ) + info.setTitle(infoObject.getTitle()); + if( !infoObject.getVersion().isEmpty() ) + info.setVersion(infoObject.getVersion()); if( !infoObject.getDescription().isEmpty() ) - info.setDescription( infoObject.getDescription() ); + info.setDescription(infoObject.getDescription()); if( !infoObject.getTermsOfService().isEmpty() ) - info.setTermsOfService( infoObject.getTermsOfService() ); + info.setTermsOfService(infoObject.getTermsOfService()); if( infoObject.hasContactObject() ) - info.setContact( ContactObject.composeContact(infoObject.getContactObject()) ); + info.setContact(ContactObject.composeContact(infoObject.getContactObject())); if( infoObject.hasLicenseObject() ) - info.setLicense( LicenseObject.composeLicense(infoObject.getLicenseObject()) ); + info.setLicense(LicenseObject.composeLicense(infoObject.getLicenseObject())); return info; } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:31 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:36 */ public static InfoObject parseInfo(Info info) { InfoObject infoObject = new InfoObject(); - infoObject.setTitle( info.getTitle() ); - infoObject.setVersion( info.getVersion() ); - + if( info.getTitle() != null ) + infoObject.setTitle(info.getTitle()); + if( info.getVersion() != null ) + infoObject.setVersion(info.getVersion()); if( info.getDescription() != null ) - infoObject.setDescription( info.getDescription() ); + infoObject.setDescription(info.getDescription()); if( info.getTermsOfService() != null ) - infoObject.setTermsOfService( info.getTermsOfService() ); + infoObject.setTermsOfService(info.getTermsOfService()); if( info.getContact() != null ) - infoObject.setContactObject( ContactObject.parseContact(info.getContact()) ); + infoObject.setContactObject(ContactObject.parseContact(info.getContact())); if( info.getLicense() != null ) - infoObject.setLicenseObject( LicenseObject.parseLicense(info.getLicense()) ); + infoObject.setLicenseObject(LicenseObject.parseLicense(info.getLicense())); return infoObject; } diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ItemsSchema.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ItemsSchema.java index 722aa08cee6c4b1729a8f67675e192b1657d2713..2ff09bea049583572a45a992807d9ffccfaa0b1d 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ItemsSchema.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ItemsSchema.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:132 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:94 * @astdecl ItemsSchema : ASTNode ::= SchemaObject; * @production ItemsSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/JastAddList.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/JastAddList.java index 13d7a9d682595bc90555b7ff349a6301e298848b..5b79f21c5a32e17c5fb7c837d4067a71af8eb731 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/JastAddList.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/JastAddList.java @@ -4,6 +4,7 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/LicenseObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LicenseObject.java index 48d0ba9828029c43f1d859ee50062ca702ad3ef2..12e1f2cb0745d61745a114b8d2da8f686e0cf755 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/LicenseObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/LicenseObject.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:12 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:11 * @astdecl LicenseObject : ASTNode ::= <Name:String> <Url:String>; * @production LicenseObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Url:String></span>; @@ -17,21 +18,21 @@ import java.net.URL; public class LicenseObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:81 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:86 */ public static License composeLicense (LicenseObject licenseObject){ License license = new License(); + if( !licenseObject.getName().isEmpty() ) license.setName( licenseObject.getName() ); - - if( licenseObject.getUrl() != null ) + if( !licenseObject.getUrl().isEmpty() ) license.setUrl( licenseObject.getUrl() ); return license; } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:62 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:68 */ public static LicenseObject parseLicense(License license){ LicenseObject licenseObject = new LicenseObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObject.java index c99e49eb2334b65e503b389371d538c3734301d7..7a73dc80aa6f24eb791b2a7cf19afdb123c0bc23 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObject.java @@ -4,27 +4,30 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:119 - * @astdecl LinkObject : ASTNode ::= <OperationRef:String> <OperationID:String> LinkParameterTuple* <LinkRequestBody:Object> <Description:String> [ServerObject]; - * @production LinkObject : {@link ASTNode} ::= <span class="component"><OperationRef:String></span> <span class="component"><OperationID:String></span> <span class="component">{@link LinkParameterTuple}*</span> <span class="component"><LinkRequestBody:Object></span> <span class="component"><Description:String></span> <span class="component">[{@link ServerObject}]</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:81 + * @astdecl LinkObject : ASTNode ::= <OperationRef:String> <OperationID:String> LinkParameterTuple* HeaderTuple* <Description:String> [ServerObject] <Ref:String>; + * @production LinkObject : {@link ASTNode} ::= <span class="component"><OperationRef:String></span> <span class="component"><OperationID:String></span> <span class="component">{@link LinkParameterTuple}*</span> <span class="component">{@link HeaderTuple}*</span> <span class="component"><Description:String></span> <span class="component">[{@link ServerObject}]</span> <span class="component"><Ref:String></span>; */ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:499 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:522 */ public static Link composeLink (LinkObject linkObject){ Link link = new Link(); - if( linkObject.getOperationRef().isEmpty() ) + if( !linkObject.getRef().isEmpty() ) + link.setRef(linkObject.getRef()); + if( !linkObject.getOperationRef().isEmpty() ) link.setOperationRef( linkObject.getOperationRef() ); - if( linkObject.getOperationID().isEmpty() ) + if( !linkObject.getOperationID().isEmpty() ) link.setOperationId( linkObject.getOperationID() ); if( linkObject.getNumLinkParameterTuple() != 0 ){ Map<String, String> parameters = new HashMap<>(); @@ -41,11 +44,13 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:557 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:535 */ public static LinkObject parseLink(Link link){ LinkObject linkObject = new LinkObject(); + if( link.isRef() ) + linkObject.setRef(link.getRef()); if( link.getOperationRef() != null ) linkObject.setOperationRef( link.getOperationRef() ); if( link.getOperationId() != null ) @@ -75,60 +80,62 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[2]; + children = new ASTNode[3]; setChild(new JastAddList(), 0); - setChild(new Opt(), 1); + setChild(new JastAddList(), 1); + setChild(new Opt(), 2); } /** - * @declaredat ASTNode:15 + * @declaredat ASTNode:16 */ @ASTNodeAnnotation.Constructor( - name = {"OperationRef", "OperationID", "LinkParameterTuple", "LinkRequestBody", "Description", "ServerObject"}, - type = {"String", "String", "JastAddList<LinkParameterTuple>", "Object", "String", "Opt<ServerObject>"}, - kind = {"Token", "Token", "List", "Token", "Token", "Opt"} + name = {"OperationRef", "OperationID", "LinkParameterTuple", "HeaderTuple", "Description", "ServerObject", "Ref"}, + type = {"String", "String", "JastAddList<LinkParameterTuple>", "JastAddList<HeaderTuple>", "String", "Opt<ServerObject>", "String"}, + kind = {"Token", "Token", "List", "List", "Token", "Opt", "Token"} ) - public LinkObject(String p0, String p1, JastAddList<LinkParameterTuple> p2, Object p3, String p4, Opt<ServerObject> p5) { + public LinkObject(String p0, String p1, JastAddList<LinkParameterTuple> p2, JastAddList<HeaderTuple> p3, String p4, Opt<ServerObject> p5, String p6) { setOperationRef(p0); setOperationID(p1); setChild(p2, 0); - setLinkRequestBody(p3); + setChild(p3, 1); setDescription(p4); - setChild(p5, 1); + setChild(p5, 2); + setRef(p6); } /** @apilevel low-level - * @declaredat ASTNode:29 + * @declaredat ASTNode:31 */ protected int numChildren() { - return 2; + return 3; } /** * @apilevel internal - * @declaredat ASTNode:35 + * @declaredat ASTNode:37 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:39 + * @declaredat ASTNode:41 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:43 + * @declaredat ASTNode:45 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:47 + * @declaredat ASTNode:49 */ public LinkObject clone() throws CloneNotSupportedException { LinkObject node = (LinkObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:52 + * @declaredat ASTNode:54 */ public LinkObject copy() { try { @@ -148,7 +155,7 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:71 + * @declaredat ASTNode:73 */ @Deprecated public LinkObject fullCopy() { @@ -159,7 +166,7 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:81 + * @declaredat ASTNode:83 */ public LinkObject treeCopyNoTransform() { LinkObject tree = (LinkObject) copy(); @@ -180,7 +187,7 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:101 + * @declaredat ASTNode:103 */ public LinkObject treeCopy() { LinkObject tree = (LinkObject) copy(); @@ -196,10 +203,10 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:115 + * @declaredat ASTNode:117 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_OperationRef == ((LinkObject) node).tokenString_OperationRef) && (tokenString_OperationID == ((LinkObject) node).tokenString_OperationID) && (tokenObject_LinkRequestBody == ((LinkObject) node).tokenObject_LinkRequestBody) && (tokenString_Description == ((LinkObject) node).tokenString_Description); + return super.is$Equal(node) && (tokenString_OperationRef == ((LinkObject) node).tokenString_OperationRef) && (tokenString_OperationID == ((LinkObject) node).tokenString_OperationID) && (tokenString_Description == ((LinkObject) node).tokenString_Description) && (tokenString_Ref == ((LinkObject) node).tokenString_Ref); } /** * Replaces the lexeme OperationRef. @@ -352,24 +359,114 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { return getLinkParameterTupleListNoTransform(); } /** - * Replaces the lexeme LinkRequestBody. - * @param value The new value for the lexeme LinkRequestBody. + * Replaces the HeaderTuple list. + * @param list The new list node to be used as the HeaderTuple list. * @apilevel high-level */ - public void setLinkRequestBody(Object value) { - tokenObject_LinkRequestBody = value; + public void setHeaderTupleList(JastAddList<HeaderTuple> list) { + setChild(list, 1); } - /** @apilevel internal + /** + * Retrieves the number of children in the HeaderTuple list. + * @return Number of children in the HeaderTuple list. + * @apilevel high-level + */ + public int getNumHeaderTuple() { + return getHeaderTupleList().getNumChild(); + } + /** + * Retrieves the number of children in the HeaderTuple list. + * Calling this method will not trigger rewrites. + * @return Number of children in the HeaderTuple list. + * @apilevel low-level + */ + public int getNumHeaderTupleNoTransform() { + return getHeaderTupleListNoTransform().getNumChildNoTransform(); + } + /** + * Retrieves the element at index {@code i} in the HeaderTuple list. + * @param i Index of the element to return. + * @return The element at position {@code i} in the HeaderTuple list. + * @apilevel high-level + */ + public HeaderTuple getHeaderTuple(int i) { + return (HeaderTuple) getHeaderTupleList().getChild(i); + } + /** + * Check whether the HeaderTuple list has any children. + * @return {@code true} if it has at least one child, {@code false} otherwise. + * @apilevel high-level + */ + public boolean hasHeaderTuple() { + return getHeaderTupleList().getNumChild() != 0; + } + /** + * Append an element to the HeaderTuple list. + * @param node The element to append to the HeaderTuple list. + * @apilevel high-level + */ + public void addHeaderTuple(HeaderTuple node) { + JastAddList<HeaderTuple> list = (parent == null) ? getHeaderTupleListNoTransform() : getHeaderTupleList(); + list.addChild(node); + } + /** @apilevel low-level + */ + public void addHeaderTupleNoTransform(HeaderTuple node) { + JastAddList<HeaderTuple> list = getHeaderTupleListNoTransform(); + list.addChild(node); + } + /** + * Replaces the HeaderTuple list element at index {@code i} with the new node {@code node}. + * @param node The new node to replace the old list element. + * @param i The list index of the node to be replaced. + * @apilevel high-level + */ + public void setHeaderTuple(HeaderTuple node, int i) { + JastAddList<HeaderTuple> list = getHeaderTupleList(); + list.setChild(node, i); + } + /** + * Retrieves the HeaderTuple list. + * @return The node representing the HeaderTuple list. + * @apilevel high-level + */ + @ASTNodeAnnotation.ListChild(name="HeaderTuple") + public JastAddList<HeaderTuple> getHeaderTupleList() { + JastAddList<HeaderTuple> list = (JastAddList<HeaderTuple>) getChild(1); + return list; + } + /** + * Retrieves the HeaderTuple list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the HeaderTuple list. + * @apilevel low-level + */ + public JastAddList<HeaderTuple> getHeaderTupleListNoTransform() { + return (JastAddList<HeaderTuple>) getChildNoTransform(1); + } + /** + * @return the element at index {@code i} in the HeaderTuple list without + * triggering rewrites. */ - protected Object tokenObject_LinkRequestBody; + public HeaderTuple getHeaderTupleNoTransform(int i) { + return (HeaderTuple) getHeaderTupleListNoTransform().getChildNoTransform(i); + } /** - * Retrieves the value for the lexeme LinkRequestBody. - * @return The value for the lexeme LinkRequestBody. + * Retrieves the HeaderTuple list. + * @return The node representing the HeaderTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.Token(name="LinkRequestBody") - public Object getLinkRequestBody() { - return tokenObject_LinkRequestBody; + public JastAddList<HeaderTuple> getHeaderTuples() { + return getHeaderTupleList(); + } + /** + * Retrieves the HeaderTuple list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the HeaderTuple list. + * @apilevel low-level + */ + public JastAddList<HeaderTuple> getHeaderTuplesNoTransform() { + return getHeaderTupleListNoTransform(); } /** * Replaces the lexeme Description. @@ -398,7 +495,7 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public void setServerObjectOpt(Opt<ServerObject> opt) { - setChild(opt, 1); + setChild(opt, 2); } /** * Replaces the (optional) ServerObject child. @@ -431,7 +528,7 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.OptChild(name="ServerObject") public Opt<ServerObject> getServerObjectOpt() { - return (Opt<ServerObject>) getChild(1); + return (Opt<ServerObject>) getChild(2); } /** * Retrieves the optional node for child ServerObject. This is the <code>Opt</code> node containing the child ServerObject, not the actual child! @@ -440,7 +537,27 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public Opt<ServerObject> getServerObjectOptNoTransform() { - return (Opt<ServerObject>) getChildNoTransform(1); + return (Opt<ServerObject>) getChildNoTransform(2); + } + /** + * Replaces the lexeme Ref. + * @param value The new value for the lexeme Ref. + * @apilevel high-level + */ + public void setRef(String value) { + tokenString_Ref = value; + } + /** @apilevel internal + */ + protected String tokenString_Ref; + /** + * Retrieves the value for the lexeme Ref. + * @return The value for the lexeme Ref. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="Ref") + public String getRef() { + return tokenString_Ref != null ? tokenString_Ref : ""; } /** @apilevel internal */ public ASTNode rewriteTo() { diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkParameterTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkParameterTuple.java index fb95aa5fd87fc29789f277a61d87b5a4761b6767..d30b4450f78a6720155cc5c4268f8d592e70c27b 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkParameterTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkParameterTuple.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:120 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:82 * @astdecl LinkParameterTuple : ASTNode ::= <LinkParameterKey:String> <LinkParameterValue:String>; * @production LinkParameterTuple : {@link ASTNode} ::= <span class="component"><LinkParameterKey:String></span> <span class="component"><LinkParameterValue:String></span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObjectTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkTuple.java similarity index 74% rename from src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObjectTuple.java rename to src/gen/java/de/tudresden/inf/st/openapi/ast/LinkTuple.java index 4b715fde88a3b86ed1958734f2d91c17a1165243..141de9082ea5eab6f95c0f4b3b0b46e05e96fcd0 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObjectTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkTuple.java @@ -4,21 +4,22 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:52 - * @astdecl LinkObjectTuple : LinksTuple ::= <Name:String> LinkObject; - * @production LinkObjectTuple : {@link LinksTuple} ::= <span class="component"><Name:String></span> <span class="component">{@link LinkObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:30 + * @astdecl LinkTuple : ASTNode ::= <Key:String> LinkObject; + * @production LinkTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link LinkObject}</span>; */ -public class LinkObjectTuple extends LinksTuple implements Cloneable { +public class LinkTuple extends ASTNode<ASTNode> implements Cloneable { /** * @declaredat ASTNode:1 */ - public LinkObjectTuple() { + public LinkTuple() { super(); } /** @@ -35,12 +36,12 @@ public class LinkObjectTuple extends LinksTuple implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "LinkObject"}, + name = {"Key", "LinkObject"}, type = {"String", "LinkObject"}, kind = {"Token", "Child"} ) - public LinkObjectTuple(String p0, LinkObject p1) { - setName(p0); + public LinkTuple(String p0, LinkObject p1) { + setKey(p0); setChild(p1, 0); } /** @apilevel low-level @@ -71,16 +72,16 @@ public class LinkObjectTuple extends LinksTuple implements Cloneable { /** @apilevel internal * @declaredat ASTNode:41 */ - public LinkObjectTuple clone() throws CloneNotSupportedException { - LinkObjectTuple node = (LinkObjectTuple) super.clone(); + public LinkTuple clone() throws CloneNotSupportedException { + LinkTuple node = (LinkTuple) super.clone(); return node; } /** @apilevel internal * @declaredat ASTNode:46 */ - public LinkObjectTuple copy() { + public LinkTuple copy() { try { - LinkObjectTuple node = (LinkObjectTuple) clone(); + LinkTuple node = (LinkTuple) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); @@ -99,7 +100,7 @@ public class LinkObjectTuple extends LinksTuple implements Cloneable { * @declaredat ASTNode:65 */ @Deprecated - public LinkObjectTuple fullCopy() { + public LinkTuple fullCopy() { return treeCopyNoTransform(); } /** @@ -109,8 +110,8 @@ public class LinkObjectTuple extends LinksTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:75 */ - public LinkObjectTuple treeCopyNoTransform() { - LinkObjectTuple tree = (LinkObjectTuple) copy(); + public LinkTuple treeCopyNoTransform() { + LinkTuple tree = (LinkTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; @@ -130,8 +131,8 @@ public class LinkObjectTuple extends LinksTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:95 */ - public LinkObjectTuple treeCopy() { - LinkObjectTuple tree = (LinkObjectTuple) copy(); + public LinkTuple treeCopy() { + LinkTuple tree = (LinkTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); @@ -147,27 +148,27 @@ public class LinkObjectTuple extends LinksTuple implements Cloneable { * @declaredat ASTNode:109 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((LinkObjectTuple) node).tokenString_Name); + return super.is$Equal(node) && (tokenString_Key == ((LinkTuple) node).tokenString_Key); } /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. + * Replaces the lexeme Key. + * @param value The new value for the lexeme Key. * @apilevel high-level */ - public void setName(String value) { - tokenString_Name = value; + public void setKey(String value) { + tokenString_Key = value; } /** @apilevel internal */ - protected String tokenString_Name; + protected String tokenString_Key; /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. + * Retrieves the value for the lexeme Key. + * @return The value for the lexeme Key. * @apilevel high-level */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; + @ASTNodeAnnotation.Token(name="Key") + public String getKey() { + return tokenString_Key != null ? tokenString_Key : ""; } /** * Replaces the LinkObject child. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinksTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinksTuple.java deleted file mode 100644 index ff8ba7d41ce15a302707dd89c077a0340ba97137..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinksTuple.java +++ /dev/null @@ -1,100 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:51 - * @astdecl LinksTuple : ASTNode; - * @production LinksTuple : {@link ASTNode}; - - */ -public abstract class LinksTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public LinksTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** @apilevel low-level - * @declaredat ASTNode:13 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:19 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:23 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:27 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public LinksTuple clone() throws CloneNotSupportedException { - LinksTuple node = (LinksTuple) super.clone(); - return node; - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:42 - */ - @Deprecated - public abstract LinksTuple fullCopy(); - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:50 - */ - public abstract LinksTuple treeCopyNoTransform(); - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:58 - */ - public abstract LinksTuple treeCopy(); - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/MappingTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/MappingTuple.java index 6350ba29de3fed49e200409ba2c99203248ce849..83b5e6cef05ebc54b7f10a4611e5fc0beda342c9 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/MappingTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/MappingTuple.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:142 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:104 * @astdecl MappingTuple : ASTNode ::= <Key:String> <Value:String>; * @production MappingTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component"><Value:String></span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/MediaTypeObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/MediaTypeObject.java index 374af5254a726d1f312585751d406a68d25f1783..d5a6acf66b44aa36972e836798306e612d04be95 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/MediaTypeObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/MediaTypeObject.java @@ -4,67 +4,62 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:94 - * @astdecl MediaTypeObject : ASTNode ::= [SchemaObject] <Example:Object> ExamplesTuple* EncodingTuple*; - * @production MediaTypeObject : {@link ASTNode} ::= <span class="component">[{@link SchemaObject}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExamplesTuple}*</span> <span class="component">{@link EncodingTuple}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:63 + * @astdecl MediaTypeObject : ASTNode ::= [SchemaObject] <Example:Object> ExampleTuple* EncodingTuple*; + * @production MediaTypeObject : {@link ASTNode} ::= <span class="component">[{@link SchemaObject}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link EncodingTuple}*</span>; */ public class MediaTypeObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:400 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:417 */ public static MediaType composeMediaType (MediaTypeObject mediaTypeObject){ MediaType mediaType = new MediaType(); - if( mediaTypeObject.getSchemaObject() != null ) { - Schema schema = new Schema(); - schema = SchemaObject.composeSchema(mediaTypeObject.getSchemaObject()); - mediaType.setSchema(schema); - } + if( mediaTypeObject.getSchemaObject() != null ) + mediaType.setSchema(SchemaObject.composeSchema(mediaTypeObject.getSchemaObject())); if( mediaTypeObject.getExample() != null ) - mediaType.setExample( mediaTypeObject.getExample() ); - if( mediaTypeObject.getNumExamplesTuple() != 0 ){ - Map<String, Example> examples = new HashMap<>(); - for( ExamplesTuple t : mediaTypeObject.getExamplesTuples() ) - examples.put( ((ExampleObjectTuple)t).getName(), ExampleObject.composeExample( ((ExampleObjectTuple)t).getExampleObject() ) ); - mediaType.setExamples(examples); + mediaType.setExample(mediaTypeObject.getExample()); + if( mediaTypeObject.getNumExampleTuple() != 0 ){ + Map<String, Example> exampleMap = new HashMap<>(); + for( ExampleTuple t : mediaTypeObject.getExampleTuples() ) + exampleMap.put(t.getKey(), ExampleObject.composeExample(t.getExampleObject())); + mediaType.setExamples(exampleMap); } if( mediaTypeObject.getNumEncodingTuple() != 0 ){ - Map<String, EncodingProperty> encodings = new HashMap<>(); + Map<String, EncodingProperty> encodingMap = new HashMap<>(); for( EncodingTuple t : mediaTypeObject.getEncodingTuples() ) - encodings.put( ((EncodingObjectTuple)t).getName(), EncodingObject.composeEncodingProperty( ((EncodingObjectTuple)t).getEncodingObject() ) ); - mediaType.setEncodings(encodings); + encodingMap.put(t.getKey(), EncodingObject.composeEncodingProperty(t.getEncodingObject())); + mediaType.setEncodings(encodingMap); } return mediaType; } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:470 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:446 */ public static MediaTypeObject parseMediaType(MediaType mediaType){ MediaTypeObject mediaTypeObject = new MediaTypeObject(); - if( mediaType.getSchema() != null ) { - SchemaObject schema = new SchemaObject(); - schema = SchemaObject.parseSchema(mediaType.getSchema()); - mediaTypeObject.setSchemaObject(schema); - } + if( mediaType.getSchema() != null ) + mediaTypeObject.setSchemaObject(SchemaObject.parseSchema(mediaType.getSchema())); if( mediaType.getExample() != null ) - mediaTypeObject.setExample( mediaType.getExample() ); + mediaTypeObject.setExample(mediaType.getExample()); if( mediaType.getExamples() != null ){ for( String key : mediaType.getExamples().keySet() ) - mediaTypeObject.addExamplesTuple(new ExampleObjectTuple(key, ExampleObject.parseExample(mediaType.getExample(key)))); + mediaTypeObject.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(mediaType.getExample(key)))); } if( mediaType.getEncodings() != null ){ for( String key : mediaType.getEncodings().keySet() ) - mediaTypeObject.addEncodingTuple(new EncodingObjectTuple(key, EncodingObject.parseEncoding(mediaType.getEncoding(key)))); + mediaTypeObject.addEncodingTuple(new EncodingTuple(key, EncodingObject.parseEncoding(mediaType.getEncoding(key)))); } return mediaTypeObject; @@ -92,11 +87,11 @@ public class MediaTypeObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:16 */ @ASTNodeAnnotation.Constructor( - name = {"SchemaObject", "Example", "ExamplesTuple", "EncodingTuple"}, - type = {"Opt<SchemaObject>", "Object", "JastAddList<ExamplesTuple>", "JastAddList<EncodingTuple>"}, + name = {"SchemaObject", "Example", "ExampleTuple", "EncodingTuple"}, + type = {"Opt<SchemaObject>", "Object", "JastAddList<ExampleTuple>", "JastAddList<EncodingTuple>"}, kind = {"Opt", "Token", "List", "List"} ) - public MediaTypeObject(Opt<SchemaObject> p0, Object p1, JastAddList<ExamplesTuple> p2, JastAddList<EncodingTuple> p3) { + public MediaTypeObject(Opt<SchemaObject> p0, Object p1, JastAddList<ExampleTuple> p2, JastAddList<EncodingTuple> p3) { setChild(p0, 0); setExample(p1); setChild(p2, 1); @@ -280,114 +275,114 @@ public class MediaTypeObject extends ASTNode<ASTNode> implements Cloneable { return tokenObject_Example; } /** - * Replaces the ExamplesTuple list. - * @param list The new list node to be used as the ExamplesTuple list. + * Replaces the ExampleTuple list. + * @param list The new list node to be used as the ExampleTuple list. * @apilevel high-level */ - public void setExamplesTupleList(JastAddList<ExamplesTuple> list) { + public void setExampleTupleList(JastAddList<ExampleTuple> list) { setChild(list, 1); } /** - * Retrieves the number of children in the ExamplesTuple list. - * @return Number of children in the ExamplesTuple list. + * Retrieves the number of children in the ExampleTuple list. + * @return Number of children in the ExampleTuple list. * @apilevel high-level */ - public int getNumExamplesTuple() { - return getExamplesTupleList().getNumChild(); + public int getNumExampleTuple() { + return getExampleTupleList().getNumChild(); } /** - * Retrieves the number of children in the ExamplesTuple list. + * Retrieves the number of children in the ExampleTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the ExamplesTuple list. + * @return Number of children in the ExampleTuple list. * @apilevel low-level */ - public int getNumExamplesTupleNoTransform() { - return getExamplesTupleListNoTransform().getNumChildNoTransform(); + public int getNumExampleTupleNoTransform() { + return getExampleTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the ExamplesTuple list. + * Retrieves the element at index {@code i} in the ExampleTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the ExamplesTuple list. + * @return The element at position {@code i} in the ExampleTuple list. * @apilevel high-level */ - public ExamplesTuple getExamplesTuple(int i) { - return (ExamplesTuple) getExamplesTupleList().getChild(i); + public ExampleTuple getExampleTuple(int i) { + return (ExampleTuple) getExampleTupleList().getChild(i); } /** - * Check whether the ExamplesTuple list has any children. + * Check whether the ExampleTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasExamplesTuple() { - return getExamplesTupleList().getNumChild() != 0; + public boolean hasExampleTuple() { + return getExampleTupleList().getNumChild() != 0; } /** - * Append an element to the ExamplesTuple list. - * @param node The element to append to the ExamplesTuple list. + * Append an element to the ExampleTuple list. + * @param node The element to append to the ExampleTuple list. * @apilevel high-level */ - public void addExamplesTuple(ExamplesTuple node) { - JastAddList<ExamplesTuple> list = (parent == null) ? getExamplesTupleListNoTransform() : getExamplesTupleList(); + public void addExampleTuple(ExampleTuple node) { + JastAddList<ExampleTuple> list = (parent == null) ? getExampleTupleListNoTransform() : getExampleTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addExamplesTupleNoTransform(ExamplesTuple node) { - JastAddList<ExamplesTuple> list = getExamplesTupleListNoTransform(); + public void addExampleTupleNoTransform(ExampleTuple node) { + JastAddList<ExampleTuple> list = getExampleTupleListNoTransform(); list.addChild(node); } /** - * Replaces the ExamplesTuple list element at index {@code i} with the new node {@code node}. + * Replaces the ExampleTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setExamplesTuple(ExamplesTuple node, int i) { - JastAddList<ExamplesTuple> list = getExamplesTupleList(); + public void setExampleTuple(ExampleTuple node, int i) { + JastAddList<ExampleTuple> list = getExampleTupleList(); list.setChild(node, i); } /** - * Retrieves the ExamplesTuple list. - * @return The node representing the ExamplesTuple list. + * Retrieves the ExampleTuple list. + * @return The node representing the ExampleTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="ExamplesTuple") - public JastAddList<ExamplesTuple> getExamplesTupleList() { - JastAddList<ExamplesTuple> list = (JastAddList<ExamplesTuple>) getChild(1); + @ASTNodeAnnotation.ListChild(name="ExampleTuple") + public JastAddList<ExampleTuple> getExampleTupleList() { + JastAddList<ExampleTuple> list = (JastAddList<ExampleTuple>) getChild(1); return list; } /** - * Retrieves the ExamplesTuple list. + * Retrieves the ExampleTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExamplesTuple list. + * @return The node representing the ExampleTuple list. * @apilevel low-level */ - public JastAddList<ExamplesTuple> getExamplesTupleListNoTransform() { - return (JastAddList<ExamplesTuple>) getChildNoTransform(1); + public JastAddList<ExampleTuple> getExampleTupleListNoTransform() { + return (JastAddList<ExampleTuple>) getChildNoTransform(1); } /** - * @return the element at index {@code i} in the ExamplesTuple list without + * @return the element at index {@code i} in the ExampleTuple list without * triggering rewrites. */ - public ExamplesTuple getExamplesTupleNoTransform(int i) { - return (ExamplesTuple) getExamplesTupleListNoTransform().getChildNoTransform(i); + public ExampleTuple getExampleTupleNoTransform(int i) { + return (ExampleTuple) getExampleTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the ExamplesTuple list. - * @return The node representing the ExamplesTuple list. + * Retrieves the ExampleTuple list. + * @return The node representing the ExampleTuple list. * @apilevel high-level */ - public JastAddList<ExamplesTuple> getExamplesTuples() { - return getExamplesTupleList(); + public JastAddList<ExampleTuple> getExampleTuples() { + return getExampleTupleList(); } /** - * Retrieves the ExamplesTuple list. + * Retrieves the ExampleTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExamplesTuple list. + * @return The node representing the ExampleTuple list. * @apilevel low-level */ - public JastAddList<ExamplesTuple> getExamplesTuplesNoTransform() { - return getExamplesTupleListNoTransform(); + public JastAddList<ExampleTuple> getExampleTuplesNoTransform() { + return getExampleTupleListNoTransform(); } /** * Replaces the EncodingTuple list. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/NotSchema.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/NotSchema.java index 6d7d4f964fbad1b0bc672915315b4c3b59e9e6d0..f171faef06abaa056a008e3d134fc40c99637db7 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/NotSchema.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/NotSchema.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:133 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:95 * @astdecl NotSchema : ASTNode ::= SchemaObject; * @production NotSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.java index ded15bbaef771f048c7ef94327429caeb48ee3d8..3f84509bfe990cddfdd99be7e7cc3e0d41bbf67c 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.java @@ -4,20 +4,21 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:159 - * @astdecl OAuthFlowObject : ASTNode ::= <AuthorizationUrl:String> <TokenUrl:String> <RefreshUrl:String> ScopesTuple*; - * @production OAuthFlowObject : {@link ASTNode} ::= <span class="component"><AuthorizationUrl:String></span> <span class="component"><TokenUrl:String></span> <span class="component"><RefreshUrl:String></span> <span class="component">{@link ScopesTuple}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:120 + * @astdecl OAuthFlowObject : ASTNode ::= <AuthorizationUrl:String> <TokenUrl:String> <RefreshUrl:String> ScopesTuple* <Configuration:String>; + * @production OAuthFlowObject : {@link ASTNode} ::= <span class="component"><AuthorizationUrl:String></span> <span class="component"><TokenUrl:String></span> <span class="component"><RefreshUrl:String></span> <span class="component">{@link ScopesTuple}*</span> <span class="component"><Configuration:String></span>; */ public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:718 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:751 */ public static OAuthFlow composeOAuthFlow (OAuthFlowObject oAuthFlowObject){ OAuthFlow oAuthFlow = new OAuthFlow(); @@ -36,7 +37,7 @@ public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:812 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:793 */ public static OAuthFlowObject parseOAuthFlow(OAuthFlow oAuthFlow){ OAuthFlowObject oAuthFlowObject = new OAuthFlowObject(); @@ -72,50 +73,51 @@ public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:14 */ @ASTNodeAnnotation.Constructor( - name = {"AuthorizationUrl", "TokenUrl", "RefreshUrl", "ScopesTuple"}, - type = {"String", "String", "String", "JastAddList<ScopesTuple>"}, - kind = {"Token", "Token", "Token", "List"} + name = {"AuthorizationUrl", "TokenUrl", "RefreshUrl", "ScopesTuple", "Configuration"}, + type = {"String", "String", "String", "JastAddList<ScopesTuple>", "String"}, + kind = {"Token", "Token", "Token", "List", "Token"} ) - public OAuthFlowObject(String p0, String p1, String p2, JastAddList<ScopesTuple> p3) { + public OAuthFlowObject(String p0, String p1, String p2, JastAddList<ScopesTuple> p3, String p4) { setAuthorizationUrl(p0); setTokenUrl(p1); setRefreshUrl(p2); setChild(p3, 0); + setConfiguration(p4); } /** @apilevel low-level - * @declaredat ASTNode:26 + * @declaredat ASTNode:27 */ protected int numChildren() { return 1; } /** * @apilevel internal - * @declaredat ASTNode:32 + * @declaredat ASTNode:33 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:36 + * @declaredat ASTNode:37 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:40 + * @declaredat ASTNode:41 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:44 + * @declaredat ASTNode:45 */ public OAuthFlowObject clone() throws CloneNotSupportedException { OAuthFlowObject node = (OAuthFlowObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:49 + * @declaredat ASTNode:50 */ public OAuthFlowObject copy() { try { @@ -135,7 +137,7 @@ public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:68 + * @declaredat ASTNode:69 */ @Deprecated public OAuthFlowObject fullCopy() { @@ -146,7 +148,7 @@ public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:78 + * @declaredat ASTNode:79 */ public OAuthFlowObject treeCopyNoTransform() { OAuthFlowObject tree = (OAuthFlowObject) copy(); @@ -167,7 +169,7 @@ public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:98 + * @declaredat ASTNode:99 */ public OAuthFlowObject treeCopy() { OAuthFlowObject tree = (OAuthFlowObject) copy(); @@ -183,10 +185,10 @@ public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:112 + * @declaredat ASTNode:113 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_AuthorizationUrl == ((OAuthFlowObject) node).tokenString_AuthorizationUrl) && (tokenString_TokenUrl == ((OAuthFlowObject) node).tokenString_TokenUrl) && (tokenString_RefreshUrl == ((OAuthFlowObject) node).tokenString_RefreshUrl); + return super.is$Equal(node) && (tokenString_AuthorizationUrl == ((OAuthFlowObject) node).tokenString_AuthorizationUrl) && (tokenString_TokenUrl == ((OAuthFlowObject) node).tokenString_TokenUrl) && (tokenString_RefreshUrl == ((OAuthFlowObject) node).tokenString_RefreshUrl) && (tokenString_Configuration == ((OAuthFlowObject) node).tokenString_Configuration); } /** * Replaces the lexeme AuthorizationUrl. @@ -358,6 +360,26 @@ public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { public JastAddList<ScopesTuple> getScopesTuplesNoTransform() { return getScopesTupleListNoTransform(); } + /** + * Replaces the lexeme Configuration. + * @param value The new value for the lexeme Configuration. + * @apilevel high-level + */ + public void setConfiguration(String value) { + tokenString_Configuration = value; + } + /** @apilevel internal + */ + protected String tokenString_Configuration; + /** + * Retrieves the value for the lexeme Configuration. + * @return The value for the lexeme Configuration. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="Configuration") + public String getConfiguration() { + return tokenString_Configuration != null ? tokenString_Configuration : ""; + } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.java index 9d05536cbd0cd6e9db9070fd831d1ea52a6d93ce..3aef4d5d737b06c0496f81065faf8e0d255655f2 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:152 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:113 * @astdecl OAuthFlowsObject : ASTNode ::= [Implicit] [Password] [ClientCredentials] [AuthorizationCode]; * @production OAuthFlowsObject : {@link ASTNode} ::= <span class="component">[{@link Implicit}]</span> <span class="component">[{@link Password}]</span> <span class="component">[{@link ClientCredentials}]</span> <span class="component">[{@link AuthorizationCode}]</span>; @@ -17,7 +18,7 @@ import java.net.URL; public class OAuthFlowsObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:703 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:736 */ public static OAuthFlows composeOAuthFlows (OAuthFlowsObject oAuthFlowsObject){ OAuthFlows oAuthFlows = new OAuthFlows(); @@ -35,7 +36,7 @@ public class OAuthFlowsObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:788 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:769 */ public static OAuthFlowsObject parseOAuthFlows(OAuthFlows oAuthFlows){ OAuthFlowsObject oAuthFlowsObject = new OAuthFlowsObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OneOfSchema.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OneOfSchema.java index 44b529e34ea3e35a26cbcb722f2a034ffd6ba965..252ae6ef95762fbfece90a58fa49f729d4602e03 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OneOfSchema.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/OneOfSchema.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:138 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:100 * @astdecl OneOfSchema : ASTNode ::= SchemaObject; * @production OneOfSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OpenAPIObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OpenAPIObject.java index 8f212026914b5cb1a0c77a1b2cd07bed1fc435e4..9190dce01e7335909fa22b220d32d84b8c8ac9cc 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OpenAPIObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/OpenAPIObject.java @@ -4,86 +4,95 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:2 - * @astdecl OpenAPIObject : ASTNode ::= <OpenAPI:String> InfoObject ServerObject* PathsObject* [ComponentsObject] SecurityRequirementObject* TagObject* [ExternalDocumentationObject]; - * @production OpenAPIObject : {@link ASTNode} ::= <span class="component"><OpenAPI:String></span> <span class="component">{@link InfoObject}</span> <span class="component">{@link ServerObject}*</span> <span class="component">{@link PathsObject}*</span> <span class="component">[{@link ComponentsObject}]</span> <span class="component">{@link SecurityRequirementObject}*</span> <span class="component">{@link TagObject}*</span> <span class="component">[{@link ExternalDocumentationObject}]</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:2 + * @astdecl OpenAPIObject : ASTNode ::= <OpenAPI:String> [InfoObject] ServerObject* PathsObject* [ComponentsObject] SecurityRequirementObject* TagObject* [ExternalDocObject] <Context:OAIContext>; + * @production OpenAPIObject : {@link ASTNode} ::= <span class="component"><OpenAPI:String></span> <span class="component">[{@link InfoObject}]</span> <span class="component">{@link ServerObject}*</span> <span class="component">{@link PathsObject}*</span> <span class="component">[{@link ComponentsObject}]</span> <span class="component">{@link SecurityRequirementObject}*</span> <span class="component">{@link TagObject}*</span> <span class="component">[{@link ExternalDocObject}]</span> <span class="component"><Context:OAIContext></span>; */ public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:12 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:13 */ - public static OpenApi3 composeOpenAPI (OpenAPIObject openAPIObject){ + public static OpenApi3 composeOpenAPI (OpenAPIObject openapi){ OpenApi3 api3 = new OpenApi3(); - api3.setOpenapi( openAPIObject.getOpenAPI() ); - api3.setInfo( InfoObject.composeInfo( openAPIObject.getInfoObject() ) ); - - if( openAPIObject.getNumPathsObject() != 0 ){ - Map<String, Path> paths = new HashMap<>(); - for( PathsObject p : openAPIObject.getPathsObjects() ) - paths.put( p.getRef(), PathItemObject.composePath(p.getPathItemObject()) ); - api3.setPaths(paths); - } - if(openAPIObject.getNumServerObject() != 0 ){ + if( !openapi.getOpenAPI().isEmpty() ) + api3.setOpenapi(openapi.getOpenAPI()); + if( openapi.hasInfoObject() ) + api3.setInfo(InfoObject.composeInfo(openapi.getInfoObject())); + if( openapi.getNumServerObject() != 0 ){ List<org.openapi4j.parser.model.v3.Server> servers = new ArrayList<>(); - for( ServerObject s : openAPIObject.getServerObjects() ) + for( ServerObject s : openapi.getServerObjects() ) servers.add(ServerObject.composeServer(s)); api3.setServers(servers); } - if( openAPIObject.hasComponentsObject() ) - api3.setComponents( ComponentsObject.composeComponents(openAPIObject.getComponentsObject()) ); - if( openAPIObject.getNumSecurityRequirementObject() != 0 ){ + if( openapi.getNumPathsObject() != 0 ){ + Map<String, Path> paths = new HashMap<>(); + for( PathsObject p : openapi.getPathsObjects() ) + paths.put( p.getRef(), PathItem.composePath(p.getPathItem()) ); + api3.setPaths(paths); + } + if( openapi.hasComponentsObject() ) + api3.setComponents( ComponentsObject.composeComponents(openapi.getComponentsObject()) ); + if( openapi.getNumSecurityRequirementObject() != 0 ){ List<SecurityRequirement> securityRequirements = new ArrayList<>(); - for( SecurityRequirementObject s : openAPIObject.getSecurityRequirementObjects() ) + for( SecurityRequirementObject s : openapi.getSecurityRequirementObjects() ) securityRequirements.add( SecurityRequirementObject.composeSecurityRequirement( s ) ); api3.setSecurityRequirements(securityRequirements); } - if( openAPIObject.getNumTagObject() != 0 ){ + if( openapi.getNumTagObject() != 0 ){ List<org.openapi4j.parser.model.v3.Tag> tags = new ArrayList<>(); - for( TagObject t : openAPIObject.getTagObjects() ) + for( TagObject t : openapi.getTagObjects() ) tags.add( TagObject.composeTag(t) ); api3.setTags( tags ); } - if( openAPIObject.hasExternalDocumentationObject() ) - api3.setExternalDocs( ExternalDocumentationObject.composeExternalDocs(openAPIObject.getExternalDocumentationObject()) ); + if( openapi.hasExternalDocObject() ) + api3.setExternalDocs(ExternalDocObject.composeExternalDocs(openapi.getExternalDocObject())); + if( openapi.getContext() != null ) + api3.setContext(openapi.getContext()); return api3; } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:3 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:3 */ public static OpenAPIObject parseOpenAPI(OpenApi3 api) throws IOException, ResolutionException, ValidationException { OpenAPIObject openapi = new OpenAPIObject(); + if( api.getOpenapi() != null ) openapi.setOpenAPI(api.getOpenapi()); - openapi.setInfoObject( InfoObject.parseInfo(api.getInfo()) ); + if( api.getInfo() != null ) + openapi.setInfoObject(InfoObject.parseInfo(api.getInfo())); + if( api.getPaths() != null ){ for( String key : api.getPaths().keySet() ) - openapi.addPathsObject( new PathsObject( key, PathItemObject.parsePath(api.getPath(key))) ); - - if( api.getServers() != null ) { + openapi.addPathsObject(new PathsObject( key, PathItem.parsePath(api.getPath(key)))); + } + if( api.getServers() != null ){ for( Server s : api.getServers() ) - openapi.addServerObject( ServerObject.parseServer(s) ); + openapi.addServerObject(ServerObject.parseServer(s)); } if( api.getComponents() != null ) - openapi.setComponentsObject( ComponentsObject.parseComponents(api.getComponents()) ); + openapi.setComponentsObject(ComponentsObject.parseComponents(api.getComponents())); if( api.getSecurityRequirements() != null ){ for( SecurityRequirement s : api.getSecurityRequirements() ) - openapi.addSecurityRequirementObject( SecurityRequirementObject.parseSecurityRequirement(s) ); + openapi.addSecurityRequirementObject(SecurityRequirementObject.parseSecurityRequirement(s)); } if( api.getTags() != null ){ for( org.openapi4j.parser.model.v3.Tag t : api.getTags() ) - openapi.addTagObject( TagObject.parseTag(t) ); + openapi.addTagObject(TagObject.parseTag(t)); } if( api.getExternalDocs() != null ) - openapi.setExternalDocumentationObject( ExternalDocumentationObject.parseExternalDocs(api.getExternalDocs()) ); + openapi.setExternalDocObject(ExternalDocObject.parseExternalDocs(api.getExternalDocs())); + if( api.getContext() != null ) + openapi.setContext(api.getContext()); return openapi; } @@ -102,6 +111,7 @@ public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { */ public void init$Children() { children = new ASTNode[7]; + setChild(new Opt(), 0); setChild(new JastAddList(), 1); setChild(new JastAddList(), 2); setChild(new Opt(), 3); @@ -110,14 +120,14 @@ public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { setChild(new Opt(), 6); } /** - * @declaredat ASTNode:19 + * @declaredat ASTNode:20 */ @ASTNodeAnnotation.Constructor( - name = {"OpenAPI", "InfoObject", "ServerObject", "PathsObject", "ComponentsObject", "SecurityRequirementObject", "TagObject", "ExternalDocumentationObject"}, - type = {"String", "InfoObject", "JastAddList<ServerObject>", "JastAddList<PathsObject>", "Opt<ComponentsObject>", "JastAddList<SecurityRequirementObject>", "JastAddList<TagObject>", "Opt<ExternalDocumentationObject>"}, - kind = {"Token", "Child", "List", "List", "Opt", "List", "List", "Opt"} + name = {"OpenAPI", "InfoObject", "ServerObject", "PathsObject", "ComponentsObject", "SecurityRequirementObject", "TagObject", "ExternalDocObject", "Context"}, + type = {"String", "Opt<InfoObject>", "JastAddList<ServerObject>", "JastAddList<PathsObject>", "Opt<ComponentsObject>", "JastAddList<SecurityRequirementObject>", "JastAddList<TagObject>", "Opt<ExternalDocObject>", "OAIContext"}, + kind = {"Token", "Opt", "List", "List", "Opt", "List", "List", "Opt", "Token"} ) - public OpenAPIObject(String p0, InfoObject p1, JastAddList<ServerObject> p2, JastAddList<PathsObject> p3, Opt<ComponentsObject> p4, JastAddList<SecurityRequirementObject> p5, JastAddList<TagObject> p6, Opt<ExternalDocumentationObject> p7) { + public OpenAPIObject(String p0, Opt<InfoObject> p1, JastAddList<ServerObject> p2, JastAddList<PathsObject> p3, Opt<ComponentsObject> p4, JastAddList<SecurityRequirementObject> p5, JastAddList<TagObject> p6, Opt<ExternalDocObject> p7, OAIContext p8) { setOpenAPI(p0); setChild(p1, 0); setChild(p2, 1); @@ -126,41 +136,42 @@ public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { setChild(p5, 4); setChild(p6, 5); setChild(p7, 6); + setContext(p8); } /** @apilevel low-level - * @declaredat ASTNode:35 + * @declaredat ASTNode:37 */ protected int numChildren() { return 7; } /** * @apilevel internal - * @declaredat ASTNode:41 + * @declaredat ASTNode:43 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:45 + * @declaredat ASTNode:47 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:49 + * @declaredat ASTNode:51 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:53 + * @declaredat ASTNode:55 */ public OpenAPIObject clone() throws CloneNotSupportedException { OpenAPIObject node = (OpenAPIObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:58 + * @declaredat ASTNode:60 */ public OpenAPIObject copy() { try { @@ -180,7 +191,7 @@ public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:77 + * @declaredat ASTNode:79 */ @Deprecated public OpenAPIObject fullCopy() { @@ -191,7 +202,7 @@ public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:87 + * @declaredat ASTNode:89 */ public OpenAPIObject treeCopyNoTransform() { OpenAPIObject tree = (OpenAPIObject) copy(); @@ -212,7 +223,7 @@ public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:107 + * @declaredat ASTNode:109 */ public OpenAPIObject treeCopy() { OpenAPIObject tree = (OpenAPIObject) copy(); @@ -228,10 +239,10 @@ public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:121 + * @declaredat ASTNode:123 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_OpenAPI == ((OpenAPIObject) node).tokenString_OpenAPI); + return super.is$Equal(node) && (tokenString_OpenAPI == ((OpenAPIObject) node).tokenString_OpenAPI) && (tokenOAIContext_Context == ((OpenAPIObject) node).tokenOAIContext_Context); } /** * Replaces the lexeme OpenAPI. @@ -254,30 +265,55 @@ public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { return tokenString_OpenAPI != null ? tokenString_OpenAPI : ""; } /** - * Replaces the InfoObject child. - * @param node The new node to replace the InfoObject child. + * Replaces the optional node for the InfoObject child. This is the <code>Opt</code> + * node containing the child InfoObject, not the actual child! + * @param opt The new node to be used as the optional node for the InfoObject child. + * @apilevel low-level + */ + public void setInfoObjectOpt(Opt<InfoObject> opt) { + setChild(opt, 0); + } + /** + * Replaces the (optional) InfoObject child. + * @param node The new node to be used as the InfoObject child. * @apilevel high-level */ public void setInfoObject(InfoObject node) { - setChild(node, 0); + getInfoObjectOpt().setChild(node, 0); } /** - * Retrieves the InfoObject child. - * @return The current node used as the InfoObject child. + * Check whether the optional InfoObject child exists. + * @return {@code true} if the optional InfoObject child exists, {@code false} if it does not. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="InfoObject") + public boolean hasInfoObject() { + return getInfoObjectOpt().getNumChild() != 0; + } + /** + * Retrieves the (optional) InfoObject child. + * @return The InfoObject child, if it exists. Returns {@code null} otherwise. + * @apilevel low-level + */ public InfoObject getInfoObject() { - return (InfoObject) getChild(0); + return (InfoObject) getInfoObjectOpt().getChild(0); + } + /** + * Retrieves the optional node for the InfoObject child. This is the <code>Opt</code> node containing the child InfoObject, not the actual child! + * @return The optional node for child the InfoObject child. + * @apilevel low-level + */ + @ASTNodeAnnotation.OptChild(name="InfoObject") + public Opt<InfoObject> getInfoObjectOpt() { + return (Opt<InfoObject>) getChild(0); } /** - * Retrieves the InfoObject child. + * Retrieves the optional node for child InfoObject. This is the <code>Opt</code> node containing the child InfoObject, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the InfoObject child. + * @return The optional node for child InfoObject. * @apilevel low-level */ - public InfoObject getInfoObjectNoTransform() { - return (InfoObject) getChildNoTransform(0); + public Opt<InfoObject> getInfoObjectOptNoTransform() { + return (Opt<InfoObject>) getChildNoTransform(0); } /** * Replaces the ServerObject list. @@ -771,55 +807,75 @@ public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { return getTagObjectListNoTransform(); } /** - * Replaces the optional node for the ExternalDocumentationObject child. This is the <code>Opt</code> - * node containing the child ExternalDocumentationObject, not the actual child! - * @param opt The new node to be used as the optional node for the ExternalDocumentationObject child. + * Replaces the optional node for the ExternalDocObject child. This is the <code>Opt</code> + * node containing the child ExternalDocObject, not the actual child! + * @param opt The new node to be used as the optional node for the ExternalDocObject child. * @apilevel low-level */ - public void setExternalDocumentationObjectOpt(Opt<ExternalDocumentationObject> opt) { + public void setExternalDocObjectOpt(Opt<ExternalDocObject> opt) { setChild(opt, 6); } /** - * Replaces the (optional) ExternalDocumentationObject child. - * @param node The new node to be used as the ExternalDocumentationObject child. + * Replaces the (optional) ExternalDocObject child. + * @param node The new node to be used as the ExternalDocObject child. * @apilevel high-level */ - public void setExternalDocumentationObject(ExternalDocumentationObject node) { - getExternalDocumentationObjectOpt().setChild(node, 0); + public void setExternalDocObject(ExternalDocObject node) { + getExternalDocObjectOpt().setChild(node, 0); } /** - * Check whether the optional ExternalDocumentationObject child exists. - * @return {@code true} if the optional ExternalDocumentationObject child exists, {@code false} if it does not. + * Check whether the optional ExternalDocObject child exists. + * @return {@code true} if the optional ExternalDocObject child exists, {@code false} if it does not. * @apilevel high-level */ - public boolean hasExternalDocumentationObject() { - return getExternalDocumentationObjectOpt().getNumChild() != 0; + public boolean hasExternalDocObject() { + return getExternalDocObjectOpt().getNumChild() != 0; } /** - * Retrieves the (optional) ExternalDocumentationObject child. - * @return The ExternalDocumentationObject child, if it exists. Returns {@code null} otherwise. + * Retrieves the (optional) ExternalDocObject child. + * @return The ExternalDocObject child, if it exists. Returns {@code null} otherwise. * @apilevel low-level */ - public ExternalDocumentationObject getExternalDocumentationObject() { - return (ExternalDocumentationObject) getExternalDocumentationObjectOpt().getChild(0); + public ExternalDocObject getExternalDocObject() { + return (ExternalDocObject) getExternalDocObjectOpt().getChild(0); } /** - * Retrieves the optional node for the ExternalDocumentationObject child. This is the <code>Opt</code> node containing the child ExternalDocumentationObject, not the actual child! - * @return The optional node for child the ExternalDocumentationObject child. + * Retrieves the optional node for the ExternalDocObject child. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! + * @return The optional node for child the ExternalDocObject child. * @apilevel low-level */ - @ASTNodeAnnotation.OptChild(name="ExternalDocumentationObject") - public Opt<ExternalDocumentationObject> getExternalDocumentationObjectOpt() { - return (Opt<ExternalDocumentationObject>) getChild(6); + @ASTNodeAnnotation.OptChild(name="ExternalDocObject") + public Opt<ExternalDocObject> getExternalDocObjectOpt() { + return (Opt<ExternalDocObject>) getChild(6); } /** - * Retrieves the optional node for child ExternalDocumentationObject. This is the <code>Opt</code> node containing the child ExternalDocumentationObject, not the actual child! + * Retrieves the optional node for child ExternalDocObject. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ExternalDocumentationObject. + * @return The optional node for child ExternalDocObject. * @apilevel low-level */ - public Opt<ExternalDocumentationObject> getExternalDocumentationObjectOptNoTransform() { - return (Opt<ExternalDocumentationObject>) getChildNoTransform(6); + public Opt<ExternalDocObject> getExternalDocObjectOptNoTransform() { + return (Opt<ExternalDocObject>) getChildNoTransform(6); + } + /** + * Replaces the lexeme Context. + * @param value The new value for the lexeme Context. + * @apilevel high-level + */ + public void setContext(OAIContext value) { + tokenOAIContext_Context = value; + } + /** @apilevel internal + */ + protected OAIContext tokenOAIContext_Context; + /** + * Retrieves the value for the lexeme Context. + * @return The value for the lexeme Context. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="Context") + public OAIContext getContext() { + return tokenOAIContext_Context; } /** @apilevel internal */ public ASTNode rewriteTo() { diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OperationObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OperationObject.java index 16768152fbbf10cef3a203d278f2ac5abd4b0cbb..fb1edbd517c1e894e66ba85eac35ed5488b99fab 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OperationObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/OperationObject.java @@ -4,20 +4,21 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:75 - * @astdecl OperationObject : ASTNode ::= Tag* <Summary:String> <Description:String> [ExternalDocumentationObject] <OperationID:String> ParameterObject* [RequestBodyObject] ResponsesObject CallbacksTuple* [DeprecatedBoolean] SecurityRequirementObject* ServerObject*; - * @production OperationObject : {@link ASTNode} ::= <span class="component">{@link Tag}*</span> <span class="component"><Summary:String></span> <span class="component"><Description:String></span> <span class="component">[{@link ExternalDocumentationObject}]</span> <span class="component"><OperationID:String></span> <span class="component">{@link ParameterObject}*</span> <span class="component">[{@link RequestBodyObject}]</span> <span class="component">{@link ResponsesObject}</span> <span class="component">{@link CallbacksTuple}*</span> <span class="component">[{@link DeprecatedBoolean}]</span> <span class="component">{@link SecurityRequirementObject}*</span> <span class="component">{@link ServerObject}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:49 + * @astdecl OperationObject : ASTNode ::= Tag* <Summary:String> <Description:String> [ExternalDocObject] <OperationID:String> ParameterObject* [RequestBodyObject] ResponseTuple* CallbackTuple* <DeprecatedBoolean:Boolean> SecurityRequirementObject* ServerObject* <Required:Boolean>; + * @production OperationObject : {@link ASTNode} ::= <span class="component">{@link Tag}*</span> <span class="component"><Summary:String></span> <span class="component"><Description:String></span> <span class="component">[{@link ExternalDocObject}]</span> <span class="component"><OperationID:String></span> <span class="component">{@link ParameterObject}*</span> <span class="component">[{@link RequestBodyObject}]</span> <span class="component">{@link ResponseTuple}*</span> <span class="component">{@link CallbackTuple}*</span> <span class="component"><DeprecatedBoolean:Boolean></span> <span class="component">{@link SecurityRequirementObject}*</span> <span class="component">{@link ServerObject}*</span> <span class="component"><Required:Boolean></span>; */ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:276 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:284 */ public static Operation composeOperation (OperationObject operationObject){ Operation operation = new Operation(); @@ -30,8 +31,8 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { operation.setSummary( operationObject.getSummary() ); if( !operationObject.getDescription().isEmpty() ) operation.setDescription( operationObject.getDescription() ); - if( operationObject.hasExternalDocumentationObject() ) - operation.setExternalDocs( ExternalDocumentationObject.composeExternalDocs(operationObject.getExternalDocumentationObject()) ); + if( operationObject.hasExternalDocObject() ) + operation.setExternalDocs( ExternalDocObject.composeExternalDocs(operationObject.getExternalDocObject()) ); if( !operationObject.getOperationID().isEmpty() ) operation.setOperationId( operationObject.getOperationID() ); if( operationObject.getNumParameterObject() != 0 ){ @@ -40,27 +41,27 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { } if( operationObject.hasRequestBodyObject() ) operation.setRequestBody( RequestBodyObject.composeRequestBody(operationObject.getRequestBodyObject())); - if( operationObject.getResponsesObject().getNumHTTPStatusCode() != 0){ - Map<String, Response> responses = new HashMap<>(); - for( HTTPStatusCode h : operationObject.getResponsesObject().getHTTPStatusCodes() ) - responses.put( ((ResponseObject)h).getName(), ResponseObject.composeResponse( ((ResponseObject) h)) ); - operation.setResponses(responses); + if( operationObject.getNumResponseTuple() != 0){ + Map<String, Response> responseMap = new HashMap<>(); + for( ResponseTuple t : operationObject.getResponseTuples() ) + responseMap.put(t.getKey(), ResponseObject.composeResponse(t.getResponseObject())); + operation.setResponses(responseMap); } - if( operationObject.getNumCallbacksTuple() != 0 ){ + if( operationObject.getNumCallbackTuple() != 0 ){ Map<String, Callback> callbacks = new HashMap<>(); - for( CallbacksTuple t : operationObject.getCallbacksTuples() ) { - if( t instanceof CallbackReferenceTuple ){ + for( CallbackTuple t : operationObject.getCallbackTuples() ) { + if( !t.getCallbackObject().getRef().isEmpty() ){ Callback callback = new Callback(); - callback.setRef(((CallbackReferenceTuple) t).getRef()); - callbacks.put(((CallbackReferenceTuple) t).getName(), callback); + callback.setRef(t.getCallbackObject().getRef()); + callbacks.put(t.getKey(), callback); } else - callbacks.put(((CallbackObjectTuple)t).getName(), CallbackObject.composeCallback(((CallbackObjectTuple)t).getCallbackObject())); - } + callbacks.put(t.getKey(), CallbackObject.composeCallback(t.getCallbackObject())); operation.setCallbacks(callbacks); } + } if( operationObject.getDeprecatedBoolean() != null ) - operation.setDeprecated(operationObject.getDeprecatedBoolean().getDeprecatedBoolean()); + operation.setDeprecated(operationObject.getDeprecatedBoolean()); if( operationObject.getNumSecurityRequirementObject() != 0 ){ for( SecurityRequirementObject s : operationObject.getSecurityRequirementObjects() ) operation.addSecurityRequirement( SecurityRequirementObject.composeSecurityRequirement(s) ); @@ -74,15 +75,13 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:343 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:330 */ public static OperationObject parseOperation(Operation operation){ OperationObject operationObject = new OperationObject(); - DeprecatedBoolean deprecatedBoolean = new DeprecatedBoolean(); - - deprecatedBoolean.setDeprecatedBoolean(operation.getDeprecated()); - operationObject.setDeprecatedBoolean(deprecatedBoolean); + if( operation.getDeprecated() != null ) + operationObject.setDeprecatedBoolean(operation.getDeprecated()); if( operation.getTags() != null ){ for(String t : operation.getTags()) { de.tudresden.inf.st.openapi.ast.Tag tag = new de.tudresden.inf.st.openapi.ast.Tag(); @@ -95,7 +94,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { if( operation.getDescription() != null ) operationObject.setDescription( operation.getDescription() ); if( operation.getExternalDocs() != null ) - operationObject.setExternalDocumentationObject( ExternalDocumentationObject.parseExternalDocs(operation.getExternalDocs()) ); + operationObject.setExternalDocObject(ExternalDocObject.parseExternalDocs(operation.getExternalDocs())); if( operation.getOperationId() != null ) operationObject.setOperationID( operation.getOperationId() ); if( operation.getParameters() != null ){ @@ -105,27 +104,16 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { if( operation.getRequestBody() != null ) operationObject.setRequestBodyObject( RequestBodyObject.parseRequestBody( operation.getRequestBody() ) ); if( operation.getResponses() != null ){ - ResponsesObject responsesObject = new ResponsesObject(); - for( String key : operation.getResponses().keySet()){ - ResponseObject responseObject; - responseObject = ResponseObject.parseResponse(operation.getResponse(key)); - responseObject.setName(key); - responsesObject.addHTTPStatusCode(responseObject); - } - operationObject.setResponsesObject(responsesObject); + for( String key : operation.getResponses().keySet()) + operationObject.addResponseTuple(new ResponseTuple(key, ResponseObject.parseResponse(operation.getResponse(key)))); } if( operation.getCallbacks() != null ){ - CallbackObjectTuple callbackObjectTuple = new CallbackObjectTuple(); - for( String key : operation.getCallbacks().keySet() ){ - callbackObjectTuple.setName(key); - callbackObjectTuple.setCallbackObject(CallbackObject.parseCallback(operation.getCallback(key))); - operationObject.addCallbacksTuple(callbackObjectTuple); - } + for( String key : operation.getCallbacks().keySet() ) + operationObject.addCallbackTuple(new CallbackTuple(key, CallbackObject.parseCallback(operation.getCallback(key)))); } - if( operation.getSecurityRequirements() != null ){ - for( SecurityRequirement sr : operation.getSecurityRequirements() ) - operationObject.addSecurityRequirementObject(SecurityRequirementObject.parseSecurityRequirement(sr)); + for( SecurityRequirement s : operation.getSecurityRequirements() ) + operationObject.addSecurityRequirementObject(SecurityRequirementObject.parseSecurityRequirement(s)); } if( operation.getServers() != null ){ for( Server s : operation.getServers() ) @@ -148,25 +136,25 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[9]; + children = new ASTNode[8]; setChild(new JastAddList(), 0); setChild(new Opt(), 1); setChild(new JastAddList(), 2); setChild(new Opt(), 3); + setChild(new JastAddList(), 4); setChild(new JastAddList(), 5); - setChild(new Opt(), 6); + setChild(new JastAddList(), 6); setChild(new JastAddList(), 7); - setChild(new JastAddList(), 8); } /** * @declaredat ASTNode:21 */ @ASTNodeAnnotation.Constructor( - name = {"Tag", "Summary", "Description", "ExternalDocumentationObject", "OperationID", "ParameterObject", "RequestBodyObject", "ResponsesObject", "CallbacksTuple", "DeprecatedBoolean", "SecurityRequirementObject", "ServerObject"}, - type = {"JastAddList<Tag>", "String", "String", "Opt<ExternalDocumentationObject>", "String", "JastAddList<ParameterObject>", "Opt<RequestBodyObject>", "ResponsesObject", "JastAddList<CallbacksTuple>", "Opt<DeprecatedBoolean>", "JastAddList<SecurityRequirementObject>", "JastAddList<ServerObject>"}, - kind = {"List", "Token", "Token", "Opt", "Token", "List", "Opt", "Child", "List", "Opt", "List", "List"} + name = {"Tag", "Summary", "Description", "ExternalDocObject", "OperationID", "ParameterObject", "RequestBodyObject", "ResponseTuple", "CallbackTuple", "DeprecatedBoolean", "SecurityRequirementObject", "ServerObject", "Required"}, + type = {"JastAddList<Tag>", "String", "String", "Opt<ExternalDocObject>", "String", "JastAddList<ParameterObject>", "Opt<RequestBodyObject>", "JastAddList<ResponseTuple>", "JastAddList<CallbackTuple>", "Boolean", "JastAddList<SecurityRequirementObject>", "JastAddList<ServerObject>", "Boolean"}, + kind = {"List", "Token", "Token", "Opt", "Token", "List", "Opt", "List", "List", "Token", "List", "List", "Token"} ) - public OperationObject(JastAddList<Tag> p0, String p1, String p2, Opt<ExternalDocumentationObject> p3, String p4, JastAddList<ParameterObject> p5, Opt<RequestBodyObject> p6, ResponsesObject p7, JastAddList<CallbacksTuple> p8, Opt<DeprecatedBoolean> p9, JastAddList<SecurityRequirementObject> p10, JastAddList<ServerObject> p11) { + public OperationObject(JastAddList<Tag> p0, String p1, String p2, Opt<ExternalDocObject> p3, String p4, JastAddList<ParameterObject> p5, Opt<RequestBodyObject> p6, JastAddList<ResponseTuple> p7, JastAddList<CallbackTuple> p8, Boolean p9, JastAddList<SecurityRequirementObject> p10, JastAddList<ServerObject> p11, Boolean p12) { setChild(p0, 0); setSummary(p1); setDescription(p2); @@ -176,44 +164,45 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { setChild(p6, 3); setChild(p7, 4); setChild(p8, 5); - setChild(p9, 6); - setChild(p10, 7); - setChild(p11, 8); + setDeprecatedBoolean(p9); + setChild(p10, 6); + setChild(p11, 7); + setRequired(p12); } /** @apilevel low-level - * @declaredat ASTNode:41 + * @declaredat ASTNode:42 */ protected int numChildren() { - return 9; + return 8; } /** * @apilevel internal - * @declaredat ASTNode:47 + * @declaredat ASTNode:48 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:51 + * @declaredat ASTNode:52 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:55 + * @declaredat ASTNode:56 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:59 + * @declaredat ASTNode:60 */ public OperationObject clone() throws CloneNotSupportedException { OperationObject node = (OperationObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:64 + * @declaredat ASTNode:65 */ public OperationObject copy() { try { @@ -233,7 +222,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:83 + * @declaredat ASTNode:84 */ @Deprecated public OperationObject fullCopy() { @@ -244,7 +233,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:93 + * @declaredat ASTNode:94 */ public OperationObject treeCopyNoTransform() { OperationObject tree = (OperationObject) copy(); @@ -265,7 +254,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:113 + * @declaredat ASTNode:114 */ public OperationObject treeCopy() { OperationObject tree = (OperationObject) copy(); @@ -281,10 +270,10 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:127 + * @declaredat ASTNode:128 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Summary == ((OperationObject) node).tokenString_Summary) && (tokenString_Description == ((OperationObject) node).tokenString_Description) && (tokenString_OperationID == ((OperationObject) node).tokenString_OperationID); + return super.is$Equal(node) && (tokenString_Summary == ((OperationObject) node).tokenString_Summary) && (tokenString_Description == ((OperationObject) node).tokenString_Description) && (tokenString_OperationID == ((OperationObject) node).tokenString_OperationID) && (tokenBoolean_DeprecatedBoolean == ((OperationObject) node).tokenBoolean_DeprecatedBoolean) && (tokenBoolean_Required == ((OperationObject) node).tokenBoolean_Required); } /** * Replaces the Tag list. @@ -437,55 +426,55 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { return tokenString_Description != null ? tokenString_Description : ""; } /** - * Replaces the optional node for the ExternalDocumentationObject child. This is the <code>Opt</code> - * node containing the child ExternalDocumentationObject, not the actual child! - * @param opt The new node to be used as the optional node for the ExternalDocumentationObject child. + * Replaces the optional node for the ExternalDocObject child. This is the <code>Opt</code> + * node containing the child ExternalDocObject, not the actual child! + * @param opt The new node to be used as the optional node for the ExternalDocObject child. * @apilevel low-level */ - public void setExternalDocumentationObjectOpt(Opt<ExternalDocumentationObject> opt) { + public void setExternalDocObjectOpt(Opt<ExternalDocObject> opt) { setChild(opt, 1); } /** - * Replaces the (optional) ExternalDocumentationObject child. - * @param node The new node to be used as the ExternalDocumentationObject child. + * Replaces the (optional) ExternalDocObject child. + * @param node The new node to be used as the ExternalDocObject child. * @apilevel high-level */ - public void setExternalDocumentationObject(ExternalDocumentationObject node) { - getExternalDocumentationObjectOpt().setChild(node, 0); + public void setExternalDocObject(ExternalDocObject node) { + getExternalDocObjectOpt().setChild(node, 0); } /** - * Check whether the optional ExternalDocumentationObject child exists. - * @return {@code true} if the optional ExternalDocumentationObject child exists, {@code false} if it does not. + * Check whether the optional ExternalDocObject child exists. + * @return {@code true} if the optional ExternalDocObject child exists, {@code false} if it does not. * @apilevel high-level */ - public boolean hasExternalDocumentationObject() { - return getExternalDocumentationObjectOpt().getNumChild() != 0; + public boolean hasExternalDocObject() { + return getExternalDocObjectOpt().getNumChild() != 0; } /** - * Retrieves the (optional) ExternalDocumentationObject child. - * @return The ExternalDocumentationObject child, if it exists. Returns {@code null} otherwise. + * Retrieves the (optional) ExternalDocObject child. + * @return The ExternalDocObject child, if it exists. Returns {@code null} otherwise. * @apilevel low-level */ - public ExternalDocumentationObject getExternalDocumentationObject() { - return (ExternalDocumentationObject) getExternalDocumentationObjectOpt().getChild(0); + public ExternalDocObject getExternalDocObject() { + return (ExternalDocObject) getExternalDocObjectOpt().getChild(0); } /** - * Retrieves the optional node for the ExternalDocumentationObject child. This is the <code>Opt</code> node containing the child ExternalDocumentationObject, not the actual child! - * @return The optional node for child the ExternalDocumentationObject child. + * Retrieves the optional node for the ExternalDocObject child. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! + * @return The optional node for child the ExternalDocObject child. * @apilevel low-level */ - @ASTNodeAnnotation.OptChild(name="ExternalDocumentationObject") - public Opt<ExternalDocumentationObject> getExternalDocumentationObjectOpt() { - return (Opt<ExternalDocumentationObject>) getChild(1); + @ASTNodeAnnotation.OptChild(name="ExternalDocObject") + public Opt<ExternalDocObject> getExternalDocObjectOpt() { + return (Opt<ExternalDocObject>) getChild(1); } /** - * Retrieves the optional node for child ExternalDocumentationObject. This is the <code>Opt</code> node containing the child ExternalDocumentationObject, not the actual child! + * Retrieves the optional node for child ExternalDocObject. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ExternalDocumentationObject. + * @return The optional node for child ExternalDocObject. * @apilevel low-level */ - public Opt<ExternalDocumentationObject> getExternalDocumentationObjectOptNoTransform() { - return (Opt<ExternalDocumentationObject>) getChildNoTransform(1); + public Opt<ExternalDocObject> getExternalDocObjectOptNoTransform() { + return (Opt<ExternalDocObject>) getChildNoTransform(1); } /** * Replaces the lexeme OperationID. @@ -669,191 +658,244 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { return (Opt<RequestBodyObject>) getChildNoTransform(3); } /** - * Replaces the ResponsesObject child. - * @param node The new node to replace the ResponsesObject child. + * Replaces the ResponseTuple list. + * @param list The new list node to be used as the ResponseTuple list. * @apilevel high-level */ - public void setResponsesObject(ResponsesObject node) { - setChild(node, 4); + public void setResponseTupleList(JastAddList<ResponseTuple> list) { + setChild(list, 4); } /** - * Retrieves the ResponsesObject child. - * @return The current node used as the ResponsesObject child. + * Retrieves the number of children in the ResponseTuple list. + * @return Number of children in the ResponseTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="ResponsesObject") - public ResponsesObject getResponsesObject() { - return (ResponsesObject) getChild(4); - } - /** - * Retrieves the ResponsesObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the ResponsesObject child. - * @apilevel low-level - */ - public ResponsesObject getResponsesObjectNoTransform() { - return (ResponsesObject) getChildNoTransform(4); + public int getNumResponseTuple() { + return getResponseTupleList().getNumChild(); } /** - * Replaces the CallbacksTuple list. - * @param list The new list node to be used as the CallbacksTuple list. - * @apilevel high-level - */ - public void setCallbacksTupleList(JastAddList<CallbacksTuple> list) { - setChild(list, 5); - } - /** - * Retrieves the number of children in the CallbacksTuple list. - * @return Number of children in the CallbacksTuple list. - * @apilevel high-level - */ - public int getNumCallbacksTuple() { - return getCallbacksTupleList().getNumChild(); - } - /** - * Retrieves the number of children in the CallbacksTuple list. + * Retrieves the number of children in the ResponseTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the CallbacksTuple list. + * @return Number of children in the ResponseTuple list. * @apilevel low-level */ - public int getNumCallbacksTupleNoTransform() { - return getCallbacksTupleListNoTransform().getNumChildNoTransform(); + public int getNumResponseTupleNoTransform() { + return getResponseTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the CallbacksTuple list. + * Retrieves the element at index {@code i} in the ResponseTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the CallbacksTuple list. + * @return The element at position {@code i} in the ResponseTuple list. * @apilevel high-level */ - public CallbacksTuple getCallbacksTuple(int i) { - return (CallbacksTuple) getCallbacksTupleList().getChild(i); + public ResponseTuple getResponseTuple(int i) { + return (ResponseTuple) getResponseTupleList().getChild(i); } /** - * Check whether the CallbacksTuple list has any children. + * Check whether the ResponseTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasCallbacksTuple() { - return getCallbacksTupleList().getNumChild() != 0; + public boolean hasResponseTuple() { + return getResponseTupleList().getNumChild() != 0; } /** - * Append an element to the CallbacksTuple list. - * @param node The element to append to the CallbacksTuple list. + * Append an element to the ResponseTuple list. + * @param node The element to append to the ResponseTuple list. * @apilevel high-level */ - public void addCallbacksTuple(CallbacksTuple node) { - JastAddList<CallbacksTuple> list = (parent == null) ? getCallbacksTupleListNoTransform() : getCallbacksTupleList(); + public void addResponseTuple(ResponseTuple node) { + JastAddList<ResponseTuple> list = (parent == null) ? getResponseTupleListNoTransform() : getResponseTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addCallbacksTupleNoTransform(CallbacksTuple node) { - JastAddList<CallbacksTuple> list = getCallbacksTupleListNoTransform(); + public void addResponseTupleNoTransform(ResponseTuple node) { + JastAddList<ResponseTuple> list = getResponseTupleListNoTransform(); list.addChild(node); } /** - * Replaces the CallbacksTuple list element at index {@code i} with the new node {@code node}. + * Replaces the ResponseTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setCallbacksTuple(CallbacksTuple node, int i) { - JastAddList<CallbacksTuple> list = getCallbacksTupleList(); + public void setResponseTuple(ResponseTuple node, int i) { + JastAddList<ResponseTuple> list = getResponseTupleList(); list.setChild(node, i); } /** - * Retrieves the CallbacksTuple list. - * @return The node representing the CallbacksTuple list. + * Retrieves the ResponseTuple list. + * @return The node representing the ResponseTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="CallbacksTuple") - public JastAddList<CallbacksTuple> getCallbacksTupleList() { - JastAddList<CallbacksTuple> list = (JastAddList<CallbacksTuple>) getChild(5); + @ASTNodeAnnotation.ListChild(name="ResponseTuple") + public JastAddList<ResponseTuple> getResponseTupleList() { + JastAddList<ResponseTuple> list = (JastAddList<ResponseTuple>) getChild(4); return list; } /** - * Retrieves the CallbacksTuple list. + * Retrieves the ResponseTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the CallbacksTuple list. + * @return The node representing the ResponseTuple list. * @apilevel low-level */ - public JastAddList<CallbacksTuple> getCallbacksTupleListNoTransform() { - return (JastAddList<CallbacksTuple>) getChildNoTransform(5); + public JastAddList<ResponseTuple> getResponseTupleListNoTransform() { + return (JastAddList<ResponseTuple>) getChildNoTransform(4); } /** - * @return the element at index {@code i} in the CallbacksTuple list without + * @return the element at index {@code i} in the ResponseTuple list without * triggering rewrites. */ - public CallbacksTuple getCallbacksTupleNoTransform(int i) { - return (CallbacksTuple) getCallbacksTupleListNoTransform().getChildNoTransform(i); + public ResponseTuple getResponseTupleNoTransform(int i) { + return (ResponseTuple) getResponseTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the CallbacksTuple list. - * @return The node representing the CallbacksTuple list. + * Retrieves the ResponseTuple list. + * @return The node representing the ResponseTuple list. * @apilevel high-level */ - public JastAddList<CallbacksTuple> getCallbacksTuples() { - return getCallbacksTupleList(); + public JastAddList<ResponseTuple> getResponseTuples() { + return getResponseTupleList(); } /** - * Retrieves the CallbacksTuple list. + * Retrieves the ResponseTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the CallbacksTuple list. + * @return The node representing the ResponseTuple list. * @apilevel low-level */ - public JastAddList<CallbacksTuple> getCallbacksTuplesNoTransform() { - return getCallbacksTupleListNoTransform(); + public JastAddList<ResponseTuple> getResponseTuplesNoTransform() { + return getResponseTupleListNoTransform(); } /** - * Replaces the optional node for the DeprecatedBoolean child. This is the <code>Opt</code> - * node containing the child DeprecatedBoolean, not the actual child! - * @param opt The new node to be used as the optional node for the DeprecatedBoolean child. + * Replaces the CallbackTuple list. + * @param list The new list node to be used as the CallbackTuple list. + * @apilevel high-level + */ + public void setCallbackTupleList(JastAddList<CallbackTuple> list) { + setChild(list, 5); + } + /** + * Retrieves the number of children in the CallbackTuple list. + * @return Number of children in the CallbackTuple list. + * @apilevel high-level + */ + public int getNumCallbackTuple() { + return getCallbackTupleList().getNumChild(); + } + /** + * Retrieves the number of children in the CallbackTuple list. + * Calling this method will not trigger rewrites. + * @return Number of children in the CallbackTuple list. * @apilevel low-level */ - public void setDeprecatedBooleanOpt(Opt<DeprecatedBoolean> opt) { - setChild(opt, 6); + public int getNumCallbackTupleNoTransform() { + return getCallbackTupleListNoTransform().getNumChildNoTransform(); } /** - * Replaces the (optional) DeprecatedBoolean child. - * @param node The new node to be used as the DeprecatedBoolean child. + * Retrieves the element at index {@code i} in the CallbackTuple list. + * @param i Index of the element to return. + * @return The element at position {@code i} in the CallbackTuple list. * @apilevel high-level */ - public void setDeprecatedBoolean(DeprecatedBoolean node) { - getDeprecatedBooleanOpt().setChild(node, 0); + public CallbackTuple getCallbackTuple(int i) { + return (CallbackTuple) getCallbackTupleList().getChild(i); } /** - * Check whether the optional DeprecatedBoolean child exists. - * @return {@code true} if the optional DeprecatedBoolean child exists, {@code false} if it does not. + * Check whether the CallbackTuple list has any children. + * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasDeprecatedBoolean() { - return getDeprecatedBooleanOpt().getNumChild() != 0; + public boolean hasCallbackTuple() { + return getCallbackTupleList().getNumChild() != 0; } /** - * Retrieves the (optional) DeprecatedBoolean child. - * @return The DeprecatedBoolean child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level + * Append an element to the CallbackTuple list. + * @param node The element to append to the CallbackTuple list. + * @apilevel high-level + */ + public void addCallbackTuple(CallbackTuple node) { + JastAddList<CallbackTuple> list = (parent == null) ? getCallbackTupleListNoTransform() : getCallbackTupleList(); + list.addChild(node); + } + /** @apilevel low-level + */ + public void addCallbackTupleNoTransform(CallbackTuple node) { + JastAddList<CallbackTuple> list = getCallbackTupleListNoTransform(); + list.addChild(node); + } + /** + * Replaces the CallbackTuple list element at index {@code i} with the new node {@code node}. + * @param node The new node to replace the old list element. + * @param i The list index of the node to be replaced. + * @apilevel high-level */ - public DeprecatedBoolean getDeprecatedBoolean() { - return (DeprecatedBoolean) getDeprecatedBooleanOpt().getChild(0); + public void setCallbackTuple(CallbackTuple node, int i) { + JastAddList<CallbackTuple> list = getCallbackTupleList(); + list.setChild(node, i); } /** - * Retrieves the optional node for the DeprecatedBoolean child. This is the <code>Opt</code> node containing the child DeprecatedBoolean, not the actual child! - * @return The optional node for child the DeprecatedBoolean child. + * Retrieves the CallbackTuple list. + * @return The node representing the CallbackTuple list. + * @apilevel high-level + */ + @ASTNodeAnnotation.ListChild(name="CallbackTuple") + public JastAddList<CallbackTuple> getCallbackTupleList() { + JastAddList<CallbackTuple> list = (JastAddList<CallbackTuple>) getChild(5); + return list; + } + /** + * Retrieves the CallbackTuple list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the CallbackTuple list. * @apilevel low-level */ - @ASTNodeAnnotation.OptChild(name="DeprecatedBoolean") - public Opt<DeprecatedBoolean> getDeprecatedBooleanOpt() { - return (Opt<DeprecatedBoolean>) getChild(6); + public JastAddList<CallbackTuple> getCallbackTupleListNoTransform() { + return (JastAddList<CallbackTuple>) getChildNoTransform(5); } /** - * Retrieves the optional node for child DeprecatedBoolean. This is the <code>Opt</code> node containing the child DeprecatedBoolean, not the actual child! + * @return the element at index {@code i} in the CallbackTuple list without + * triggering rewrites. + */ + public CallbackTuple getCallbackTupleNoTransform(int i) { + return (CallbackTuple) getCallbackTupleListNoTransform().getChildNoTransform(i); + } + /** + * Retrieves the CallbackTuple list. + * @return The node representing the CallbackTuple list. + * @apilevel high-level + */ + public JastAddList<CallbackTuple> getCallbackTuples() { + return getCallbackTupleList(); + } + /** + * Retrieves the CallbackTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child DeprecatedBoolean. + * @return The node representing the CallbackTuple list. * @apilevel low-level */ - public Opt<DeprecatedBoolean> getDeprecatedBooleanOptNoTransform() { - return (Opt<DeprecatedBoolean>) getChildNoTransform(6); + public JastAddList<CallbackTuple> getCallbackTuplesNoTransform() { + return getCallbackTupleListNoTransform(); + } + /** + * Replaces the lexeme DeprecatedBoolean. + * @param value The new value for the lexeme DeprecatedBoolean. + * @apilevel high-level + */ + public void setDeprecatedBoolean(Boolean value) { + tokenBoolean_DeprecatedBoolean = value; + } + /** @apilevel internal + */ + protected Boolean tokenBoolean_DeprecatedBoolean; + /** + * Retrieves the value for the lexeme DeprecatedBoolean. + * @return The value for the lexeme DeprecatedBoolean. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="DeprecatedBoolean") + public Boolean getDeprecatedBoolean() { + return tokenBoolean_DeprecatedBoolean; } /** * Replaces the SecurityRequirementObject list. @@ -861,7 +903,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel high-level */ public void setSecurityRequirementObjectList(JastAddList<SecurityRequirementObject> list) { - setChild(list, 7); + setChild(list, 6); } /** * Retrieves the number of children in the SecurityRequirementObject list. @@ -929,7 +971,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.ListChild(name="SecurityRequirementObject") public JastAddList<SecurityRequirementObject> getSecurityRequirementObjectList() { - JastAddList<SecurityRequirementObject> list = (JastAddList<SecurityRequirementObject>) getChild(7); + JastAddList<SecurityRequirementObject> list = (JastAddList<SecurityRequirementObject>) getChild(6); return list; } /** @@ -939,7 +981,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public JastAddList<SecurityRequirementObject> getSecurityRequirementObjectListNoTransform() { - return (JastAddList<SecurityRequirementObject>) getChildNoTransform(7); + return (JastAddList<SecurityRequirementObject>) getChildNoTransform(6); } /** * @return the element at index {@code i} in the SecurityRequirementObject list without @@ -971,7 +1013,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel high-level */ public void setServerObjectList(JastAddList<ServerObject> list) { - setChild(list, 8); + setChild(list, 7); } /** * Retrieves the number of children in the ServerObject list. @@ -1039,7 +1081,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.ListChild(name="ServerObject") public JastAddList<ServerObject> getServerObjectList() { - JastAddList<ServerObject> list = (JastAddList<ServerObject>) getChild(8); + JastAddList<ServerObject> list = (JastAddList<ServerObject>) getChild(7); return list; } /** @@ -1049,7 +1091,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public JastAddList<ServerObject> getServerObjectListNoTransform() { - return (JastAddList<ServerObject>) getChildNoTransform(8); + return (JastAddList<ServerObject>) getChildNoTransform(7); } /** * @return the element at index {@code i} in the ServerObject list without @@ -1075,6 +1117,26 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { public JastAddList<ServerObject> getServerObjectsNoTransform() { return getServerObjectListNoTransform(); } + /** + * Replaces the lexeme Required. + * @param value The new value for the lexeme Required. + * @apilevel high-level + */ + public void setRequired(Boolean value) { + tokenBoolean_Required = value; + } + /** @apilevel internal + */ + protected Boolean tokenBoolean_Required; + /** + * Retrieves the value for the lexeme Required. + * @return The value for the lexeme Required. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="Required") + public Boolean getRequired() { + return tokenBoolean_Required; + } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Opt.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Opt.java index 11f8449f8ad6545ab84c9ec5f316d95798a85ff2..080316bc2accf67b9bc1fd6e6c719c504b276abe 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Opt.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Opt.java @@ -4,6 +4,7 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Options.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Options.java index 06fd10949dac8062c306255ea360ef195a0fbf8d..9f85b769db0ecbd25e5bac161157b3a461545db2 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Options.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Options.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:68 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:43 * @astdecl Options : ASTNode ::= OperationObject; * @production Options : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObject.java index 49ada8210d44fb5724a13a42f3350bdded57b9dd..a6b4eb308dfaa0f73b7b2bbbe58a0fb79c270eb9 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObject.java @@ -4,104 +4,101 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:72 - * @astdecl ParameterObject : ASTNode ::= <Name:String> <In:String> <Description:String> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style:String> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExamplesTuple* ContentTuple* <Ref:String>; - * @production ParameterObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><In:String></span> <span class="component"><Description:String></span> <span class="component"><Required:Boolean></span> <span class="component"><DeprecatedBoolean:Boolean></span> <span class="component"><AllowEmptyValue:Boolean></span> <span class="component"><Style:String></span> <span class="component"><Explode:Boolean></span> <span class="component"><AllowReserved:Boolean></span> <span class="component">[{@link SchemaObject}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExamplesTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component"><Ref:String></span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:56 + * @astdecl ParameterObject : ASTNode ::= <Name:String> <In:String> <Description:String> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style:String> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExampleTuple* ContentTuple* <Ref:String>; + * @production ParameterObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><In:String></span> <span class="component"><Description:String></span> <span class="component"><Required:Boolean></span> <span class="component"><DeprecatedBoolean:Boolean></span> <span class="component"><AllowEmptyValue:Boolean></span> <span class="component"><Style:String></span> <span class="component"><Explode:Boolean></span> <span class="component"><AllowReserved:Boolean></span> <span class="component">[{@link SchemaObject}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component"><Ref:String></span>; */ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:340 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:355 */ public static Parameter composeParameter (ParameterObject parameterObject){ Parameter parameter = new Parameter(); - parameter.setName( parameterObject.getName() ); - parameter.setIn( parameterObject.getIn() ); - parameter.setRequired( parameterObject.getRequired() ); - + if( !parameterObject.getRef().isEmpty() ) + parameter.setRef(parameterObject.getRef()); + if( !parameterObject.getName().isEmpty() ) + parameter.setName(parameterObject.getName()); + if( !parameterObject.getIn().isEmpty() ) + parameter.setIn(parameterObject.getIn()); + if( parameterObject.getRequired() != null ) + parameter.setRequired(parameterObject.getRequired()); if( !parameterObject.getDescription().isEmpty() ) - parameter.setDescription( parameterObject.getDescription() ); + parameter.setDescription(parameterObject.getDescription()); if( parameterObject.getDeprecatedBoolean() != null ) - parameter.setDeprecated( parameterObject.getDeprecatedBoolean() ); - if( parameterObject.getStyle() != null ) - parameter.setStyle( parameter.getStyle() ); + parameter.setDeprecated(parameterObject.getDeprecatedBoolean()); + if( !parameterObject.getStyle().isEmpty() ) + parameter.setStyle(parameterObject.getStyle()); if( parameterObject.getAllowReserved() != null ) - parameter.setAllowReserved( parameterObject.getAllowReserved() ); + parameter.setAllowReserved(parameterObject.getAllowReserved()); if( parameterObject.getExplode() != null ) - parameter.setExplode( parameterObject.getExplode() ); - if( parameterObject.getAllowReserved() != null ) - parameter.setAllowReserved( parameterObject.getAllowReserved() ); - if( parameterObject.getSchemaObject() != null ){ - Schema schema = new Schema(); - schema = SchemaObject.composeSchema(parameterObject.getSchemaObject()); - if( !parameterObject.getRef().isEmpty() ) - schema.setRef(parameterObject.getRef()); - parameter.setSchema(schema);} + parameter.setExplode(parameterObject.getExplode()); + if( parameterObject.getSchemaObject() != null ) + parameter.setSchema(SchemaObject.composeSchema(parameterObject.getSchemaObject())); if( parameterObject.getExample() != null ) - parameter.setExample( parameterObject.getExample() ); - if( parameterObject.getNumExamplesTuple() != 0 ){ - Map<String, Example> examples = new HashMap<>(); - for( ExamplesTuple t : parameterObject.getExamplesTuples() ) - examples.put( ((ExampleObjectTuple)t).getName(), ExampleObject.composeExample( ((ExampleObjectTuple)t).getExampleObject() ) ); - parameter.setExamples(examples); + parameter.setExample(parameterObject.getExample()); + if( parameterObject.getNumExampleTuple() != 0 ){ + Map<String, Example> exampleMap = new HashMap<>(); + for( ExampleTuple t : parameterObject.getExampleTuples() ) + exampleMap.put(t.getKey(), ExampleObject.composeExample(t.getExampleObject())); + parameter.setExamples(exampleMap); } if( parameterObject.getNumContentTuple() != 0 ){ - Map<String, MediaType> contents = new HashMap<>(); + Map<String, MediaType> contentMap = new HashMap<>(); for( ContentTuple t : parameterObject.getContentTuples() ) - contents.put( ((ContentObjectTuple)t).getName(), MediaTypeObject.composeMediaType( ((ContentObjectTuple)t).getMediaTypeObject() ) ); - parameter.setContentMediaTypes(contents); + contentMap.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); + parameter.setContentMediaTypes(contentMap); } + if( parameterObject.getRequired() != null ) + parameter.setRequired(parameterObject.getRequired()); return parameter; } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:412 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:392 */ public static ParameterObject parseParameter(Parameter parameter){ ParameterObject parameterObject = new ParameterObject(); + if( parameter.isRef() ) + parameterObject.setRef(parameter.getRef()); + if( parameter.getName() != null ) parameterObject.setName(parameter.getName()); + if( parameter.getIn() != null ) parameterObject.setIn(parameter.getIn()); - if( parameter.getRequired() == null ) - parameterObject.setRequired(false); - else - parameterObject.setRequired(parameter.getRequired()); - if( parameter.getDescription() != null ) - parameterObject.setDescription( parameter.getDescription() ); + parameterObject.setDescription(parameter.getDescription()); if( parameter.getDeprecated() != null ) - parameterObject.setDeprecatedBoolean( parameter.getDeprecated() ); + parameterObject.setDeprecatedBoolean(parameter.getDeprecated()); if( parameter.getStyle() != null ) parameterObject.setStyle( parameter.getStyle() ); if( parameter.getExplode() != null ) parameterObject.setExplode( parameter.getExplode() ); if( parameter.getAllowReserved() != null ) parameterObject.setAllowReserved( parameter.getAllowReserved() ); - if( parameter.getSchema() != null ){ - SchemaObject schema = new SchemaObject(); - schema = SchemaObject.parseSchema(parameter.getSchema()); - if( parameter.getSchema().isRef() ) - schema.setRef(parameter.getSchema().getRef()); - parameterObject.setSchemaObject(schema); - } + if( parameter.getSchema() != null ) + parameterObject.setSchemaObject(SchemaObject.parseSchema(parameter.getSchema())); if( parameter.getExample() != null ) parameterObject.setExample( parameter.getExample() ); if( parameter.getExamples() != null ){ for( String key : parameter.getExamples().keySet() ) - parameterObject.addExamplesTuple(new ExampleObjectTuple(key, ExampleObject.parseExample(parameter.getExample(key)))); + parameterObject.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(parameter.getExample(key)))); } if( parameter.getContentMediaTypes() != null ){ for( String key : parameter.getContentMediaTypes().keySet() ) - parameterObject.addContentTuple(new ContentObjectTuple(key, MediaTypeObject.parseMediaType(parameter.getContentMediaType(key)))); + parameterObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(parameter.getContentMediaType(key)))); } + if( parameter.getRequired() != null ) + parameterObject.setRequired(parameter.getRequired()); return parameterObject; } @@ -128,11 +125,11 @@ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:16 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "In", "Description", "Required", "DeprecatedBoolean", "AllowEmptyValue", "Style", "Explode", "AllowReserved", "SchemaObject", "Example", "ExamplesTuple", "ContentTuple", "Ref"}, - type = {"String", "String", "String", "Boolean", "Boolean", "Boolean", "String", "Boolean", "Boolean", "Opt<SchemaObject>", "Object", "JastAddList<ExamplesTuple>", "JastAddList<ContentTuple>", "String"}, + name = {"Name", "In", "Description", "Required", "DeprecatedBoolean", "AllowEmptyValue", "Style", "Explode", "AllowReserved", "SchemaObject", "Example", "ExampleTuple", "ContentTuple", "Ref"}, + type = {"String", "String", "String", "Boolean", "Boolean", "Boolean", "String", "Boolean", "Boolean", "Opt<SchemaObject>", "Object", "JastAddList<ExampleTuple>", "JastAddList<ContentTuple>", "String"}, kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "List", "List", "Token"} ) - public ParameterObject(String p0, String p1, String p2, Boolean p3, Boolean p4, Boolean p5, String p6, Boolean p7, Boolean p8, Opt<SchemaObject> p9, Object p10, JastAddList<ExamplesTuple> p11, JastAddList<ContentTuple> p12, String p13) { + public ParameterObject(String p0, String p1, String p2, Boolean p3, Boolean p4, Boolean p5, String p6, Boolean p7, Boolean p8, Opt<SchemaObject> p9, Object p10, JastAddList<ExampleTuple> p11, JastAddList<ContentTuple> p12, String p13) { setName(p0); setIn(p1); setDescription(p2); @@ -506,114 +503,114 @@ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { return tokenObject_Example; } /** - * Replaces the ExamplesTuple list. - * @param list The new list node to be used as the ExamplesTuple list. + * Replaces the ExampleTuple list. + * @param list The new list node to be used as the ExampleTuple list. * @apilevel high-level */ - public void setExamplesTupleList(JastAddList<ExamplesTuple> list) { + public void setExampleTupleList(JastAddList<ExampleTuple> list) { setChild(list, 1); } /** - * Retrieves the number of children in the ExamplesTuple list. - * @return Number of children in the ExamplesTuple list. + * Retrieves the number of children in the ExampleTuple list. + * @return Number of children in the ExampleTuple list. * @apilevel high-level */ - public int getNumExamplesTuple() { - return getExamplesTupleList().getNumChild(); + public int getNumExampleTuple() { + return getExampleTupleList().getNumChild(); } /** - * Retrieves the number of children in the ExamplesTuple list. + * Retrieves the number of children in the ExampleTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the ExamplesTuple list. + * @return Number of children in the ExampleTuple list. * @apilevel low-level */ - public int getNumExamplesTupleNoTransform() { - return getExamplesTupleListNoTransform().getNumChildNoTransform(); + public int getNumExampleTupleNoTransform() { + return getExampleTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the ExamplesTuple list. + * Retrieves the element at index {@code i} in the ExampleTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the ExamplesTuple list. + * @return The element at position {@code i} in the ExampleTuple list. * @apilevel high-level */ - public ExamplesTuple getExamplesTuple(int i) { - return (ExamplesTuple) getExamplesTupleList().getChild(i); + public ExampleTuple getExampleTuple(int i) { + return (ExampleTuple) getExampleTupleList().getChild(i); } /** - * Check whether the ExamplesTuple list has any children. + * Check whether the ExampleTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasExamplesTuple() { - return getExamplesTupleList().getNumChild() != 0; + public boolean hasExampleTuple() { + return getExampleTupleList().getNumChild() != 0; } /** - * Append an element to the ExamplesTuple list. - * @param node The element to append to the ExamplesTuple list. + * Append an element to the ExampleTuple list. + * @param node The element to append to the ExampleTuple list. * @apilevel high-level */ - public void addExamplesTuple(ExamplesTuple node) { - JastAddList<ExamplesTuple> list = (parent == null) ? getExamplesTupleListNoTransform() : getExamplesTupleList(); + public void addExampleTuple(ExampleTuple node) { + JastAddList<ExampleTuple> list = (parent == null) ? getExampleTupleListNoTransform() : getExampleTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addExamplesTupleNoTransform(ExamplesTuple node) { - JastAddList<ExamplesTuple> list = getExamplesTupleListNoTransform(); + public void addExampleTupleNoTransform(ExampleTuple node) { + JastAddList<ExampleTuple> list = getExampleTupleListNoTransform(); list.addChild(node); } /** - * Replaces the ExamplesTuple list element at index {@code i} with the new node {@code node}. + * Replaces the ExampleTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setExamplesTuple(ExamplesTuple node, int i) { - JastAddList<ExamplesTuple> list = getExamplesTupleList(); + public void setExampleTuple(ExampleTuple node, int i) { + JastAddList<ExampleTuple> list = getExampleTupleList(); list.setChild(node, i); } /** - * Retrieves the ExamplesTuple list. - * @return The node representing the ExamplesTuple list. + * Retrieves the ExampleTuple list. + * @return The node representing the ExampleTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="ExamplesTuple") - public JastAddList<ExamplesTuple> getExamplesTupleList() { - JastAddList<ExamplesTuple> list = (JastAddList<ExamplesTuple>) getChild(1); + @ASTNodeAnnotation.ListChild(name="ExampleTuple") + public JastAddList<ExampleTuple> getExampleTupleList() { + JastAddList<ExampleTuple> list = (JastAddList<ExampleTuple>) getChild(1); return list; } /** - * Retrieves the ExamplesTuple list. + * Retrieves the ExampleTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExamplesTuple list. + * @return The node representing the ExampleTuple list. * @apilevel low-level */ - public JastAddList<ExamplesTuple> getExamplesTupleListNoTransform() { - return (JastAddList<ExamplesTuple>) getChildNoTransform(1); + public JastAddList<ExampleTuple> getExampleTupleListNoTransform() { + return (JastAddList<ExampleTuple>) getChildNoTransform(1); } /** - * @return the element at index {@code i} in the ExamplesTuple list without + * @return the element at index {@code i} in the ExampleTuple list without * triggering rewrites. */ - public ExamplesTuple getExamplesTupleNoTransform(int i) { - return (ExamplesTuple) getExamplesTupleListNoTransform().getChildNoTransform(i); + public ExampleTuple getExampleTupleNoTransform(int i) { + return (ExampleTuple) getExampleTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the ExamplesTuple list. - * @return The node representing the ExamplesTuple list. + * Retrieves the ExampleTuple list. + * @return The node representing the ExampleTuple list. * @apilevel high-level */ - public JastAddList<ExamplesTuple> getExamplesTuples() { - return getExamplesTupleList(); + public JastAddList<ExampleTuple> getExampleTuples() { + return getExampleTupleList(); } /** - * Retrieves the ExamplesTuple list. + * Retrieves the ExampleTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the ExamplesTuple list. + * @return The node representing the ExampleTuple list. * @apilevel low-level */ - public JastAddList<ExamplesTuple> getExamplesTuplesNoTransform() { - return getExamplesTupleListNoTransform(); + public JastAddList<ExampleTuple> getExampleTuplesNoTransform() { + return getExampleTupleListNoTransform(); } /** * Replaces the ContentTuple list. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObjectTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObjectTuple.java deleted file mode 100644 index 459d660ee8c888409611f6596c59c3a413e98710..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObjectTuple.java +++ /dev/null @@ -1,206 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:37 - * @astdecl ParameterObjectTuple : ParameterTuple ::= <Name:String> ParameterObject; - * @production ParameterObjectTuple : {@link ParameterTuple} ::= <span class="component"><Name:String></span> <span class="component">{@link ParameterObject}</span>; - - */ -public class ParameterObjectTuple extends ParameterTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ParameterObjectTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - } - /** - * @declaredat ASTNode:13 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "ParameterObject"}, - type = {"String", "ParameterObject"}, - kind = {"Token", "Child"} - ) - public ParameterObjectTuple(String p0, ParameterObject p1) { - setName(p0); - setChild(p1, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public ParameterObjectTuple clone() throws CloneNotSupportedException { - ParameterObjectTuple node = (ParameterObjectTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public ParameterObjectTuple copy() { - try { - ParameterObjectTuple node = (ParameterObjectTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public ParameterObjectTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public ParameterObjectTuple treeCopyNoTransform() { - ParameterObjectTuple tree = (ParameterObjectTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public ParameterObjectTuple treeCopy() { - ParameterObjectTuple tree = (ParameterObjectTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((ParameterObjectTuple) node).tokenString_Name); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the ParameterObject child. - * @param node The new node to replace the ParameterObject child. - * @apilevel high-level - */ - public void setParameterObject(ParameterObject node) { - setChild(node, 0); - } - /** - * Retrieves the ParameterObject child. - * @return The current node used as the ParameterObject child. - * @apilevel high-level - */ - @ASTNodeAnnotation.Child(name="ParameterObject") - public ParameterObject getParameterObject() { - return (ParameterObject) getChild(0); - } - /** - * Retrieves the ParameterObject child. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the ParameterObject child. - * @apilevel low-level - */ - public ParameterObject getParameterObjectNoTransform() { - return (ParameterObject) getChildNoTransform(0); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterReferenceTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterReferenceTuple.java deleted file mode 100644 index 31291ae94e76260cc8c5b79d6a9e6db4bc51ec22..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterReferenceTuple.java +++ /dev/null @@ -1,199 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:38 - * @astdecl ParameterReferenceTuple : ParameterTuple ::= <Name:String> <Ref:String>; - * @production ParameterReferenceTuple : {@link ParameterTuple} ::= <span class="component"><Name:String></span> <span class="component"><Ref:String></span>; - - */ -public class ParameterReferenceTuple extends ParameterTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ParameterReferenceTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Ref"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public ParameterReferenceTuple(String p0, String p1) { - setName(p0); - setRef(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public ParameterReferenceTuple clone() throws CloneNotSupportedException { - ParameterReferenceTuple node = (ParameterReferenceTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public ParameterReferenceTuple copy() { - try { - ParameterReferenceTuple node = (ParameterReferenceTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public ParameterReferenceTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public ParameterReferenceTuple treeCopyNoTransform() { - ParameterReferenceTuple tree = (ParameterReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public ParameterReferenceTuple treeCopy() { - ParameterReferenceTuple tree = (ParameterReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((ParameterReferenceTuple) node).tokenString_Name) && (tokenString_Ref == ((ParameterReferenceTuple) node).tokenString_Ref); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterTuple.java index b0d77691a0c59be9cf817c798c74136c4e164f95..448f452be460c85312b7e1b1905aef8599457503 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterTuple.java @@ -4,17 +4,18 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:36 - * @astdecl ParameterTuple : ASTNode; - * @production ParameterTuple : {@link ASTNode}; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:25 + * @astdecl ParameterTuple : ASTNode ::= <Key:String> ParameterObject; + * @production ParameterTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link ParameterObject}</span>; */ -public abstract class ParameterTuple extends ASTNode<ASTNode> implements Cloneable { +public class ParameterTuple extends ASTNode<ASTNode> implements Cloneable { /** * @declaredat ASTNode:1 */ @@ -29,66 +30,172 @@ public abstract class ParameterTuple extends ASTNode<ASTNode> implements Cloneab * @declaredat ASTNode:10 */ public void init$Children() { + children = new ASTNode[1]; } - /** @apilevel low-level + /** * @declaredat ASTNode:13 */ + @ASTNodeAnnotation.Constructor( + name = {"Key", "ParameterObject"}, + type = {"String", "ParameterObject"}, + kind = {"Token", "Child"} + ) + public ParameterTuple(String p0, ParameterObject p1) { + setKey(p0); + setChild(p1, 0); + } + /** @apilevel low-level + * @declaredat ASTNode:23 + */ protected int numChildren() { - return 0; + return 1; } /** * @apilevel internal - * @declaredat ASTNode:19 + * @declaredat ASTNode:29 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:23 + * @declaredat ASTNode:33 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:27 + * @declaredat ASTNode:37 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:31 + * @declaredat ASTNode:41 */ public ParameterTuple clone() throws CloneNotSupportedException { ParameterTuple node = (ParameterTuple) super.clone(); return node; } + /** @apilevel internal + * @declaredat ASTNode:46 + */ + public ParameterTuple copy() { + try { + ParameterTuple node = (ParameterTuple) clone(); + node.parent = null; + if (children != null) { + node.children = (ASTNode[]) children.clone(); + } + return node; + } catch (CloneNotSupportedException e) { + throw new Error("Error: clone not supported for " + getClass().getName()); + } + } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:42 + * @declaredat ASTNode:65 */ @Deprecated - public abstract ParameterTuple fullCopy(); + public ParameterTuple fullCopy() { + return treeCopyNoTransform(); + } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:50 + * @declaredat ASTNode:75 */ - public abstract ParameterTuple treeCopyNoTransform(); + public ParameterTuple treeCopyNoTransform() { + ParameterTuple tree = (ParameterTuple) copy(); + if (children != null) { + for (int i = 0; i < children.length; ++i) { + ASTNode child = (ASTNode) children[i]; + if (child != null) { + child = child.treeCopyNoTransform(); + tree.setChild(child, i); + } + } + } + return tree; + } /** * Create a deep copy of the AST subtree at this node. * The subtree of this node is traversed to trigger rewrites before copy. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:58 + * @declaredat ASTNode:95 + */ + public ParameterTuple treeCopy() { + ParameterTuple tree = (ParameterTuple) copy(); + if (children != null) { + for (int i = 0; i < children.length; ++i) { + ASTNode child = (ASTNode) getChild(i); + if (child != null) { + child = child.treeCopy(); + tree.setChild(child, i); + } + } + } + return tree; + } + /** @apilevel internal + * @declaredat ASTNode:109 + */ + protected boolean is$Equal(ASTNode node) { + return super.is$Equal(node) && (tokenString_Key == ((ParameterTuple) node).tokenString_Key); + } + /** + * Replaces the lexeme Key. + * @param value The new value for the lexeme Key. + * @apilevel high-level + */ + public void setKey(String value) { + tokenString_Key = value; + } + /** @apilevel internal + */ + protected String tokenString_Key; + /** + * Retrieves the value for the lexeme Key. + * @return The value for the lexeme Key. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="Key") + public String getKey() { + return tokenString_Key != null ? tokenString_Key : ""; + } + /** + * Replaces the ParameterObject child. + * @param node The new node to replace the ParameterObject child. + * @apilevel high-level + */ + public void setParameterObject(ParameterObject node) { + setChild(node, 0); + } + /** + * Retrieves the ParameterObject child. + * @return The current node used as the ParameterObject child. + * @apilevel high-level + */ + @ASTNodeAnnotation.Child(name="ParameterObject") + public ParameterObject getParameterObject() { + return (ParameterObject) getChild(0); + } + /** + * Retrieves the ParameterObject child. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The current node used as the ParameterObject child. + * @apilevel low-level */ - public abstract ParameterTuple treeCopy(); + public ParameterObject getParameterObjectNoTransform() { + return (ParameterObject) getChildNoTransform(0); + } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Password.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Password.java index e1179eb23e70200d973854d2ca8b7faf82aafa4d..c7d403b47f11b7e1f5cddada9655949a3dd8707c 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Password.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Password.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:154 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:115 * @astdecl Password : ASTNode ::= OAuthFlowObject; * @production Password : {@link ASTNode} ::= <span class="component">{@link OAuthFlowObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Patch.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Patch.java index 26554adbcfe4d5a612c8d06ad45e2de48bdb70c5..d93425dbdb9da2403c72183609f69407833881ed 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Patch.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Patch.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:70 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:45 * @astdecl Patch : ASTNode ::= OperationObject; * @production Patch : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItemObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItem.java similarity index 87% rename from src/gen/java/de/tudresden/inf/st/openapi/ast/PathItemObject.java rename to src/gen/java/de/tudresden/inf/st/openapi/ast/PathItem.java index 602f4ed85efadeecd02320e9dea635b8e1267953..f872eeec0c4bbf2afec5658616b268ddbe31f11e 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItemObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItem.java @@ -4,48 +4,52 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:60 - * @astdecl PathItemObject : ASTNode ::= <Ref:String> <Summary:String> <Description:String> [Get] [Put] [Post] [Delete] [Options] [Head] [Patch] [Trace] ServerObject* ParameterObject*; - * @production PathItemObject : {@link ASTNode} ::= <span class="component"><Ref:String></span> <span class="component"><Summary:String></span> <span class="component"><Description:String></span> <span class="component">[{@link Get}]</span> <span class="component">[{@link Put}]</span> <span class="component">[{@link Post}]</span> <span class="component">[{@link Delete}]</span> <span class="component">[{@link Options}]</span> <span class="component">[{@link Head}]</span> <span class="component">[{@link Patch}]</span> <span class="component">[{@link Trace}]</span> <span class="component">{@link ServerObject}*</span> <span class="component">{@link ParameterObject}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:38 + * @astdecl PathItem : ASTNode ::= <Ref:String> <Summary:String> <Description:String> [Get] [Put] [Post] [Delete] [Options] [Head] [Patch] [Trace] ServerObject* ParameterObject*; + * @production PathItem : {@link ASTNode} ::= <span class="component"><Ref:String></span> <span class="component"><Summary:String></span> <span class="component"><Description:String></span> <span class="component">[{@link Get}]</span> <span class="component">[{@link Put}]</span> <span class="component">[{@link Post}]</span> <span class="component">[{@link Delete}]</span> <span class="component">[{@link Options}]</span> <span class="component">[{@link Head}]</span> <span class="component">[{@link Patch}]</span> <span class="component">[{@link Trace}]</span> <span class="component">{@link ServerObject}*</span> <span class="component">{@link ParameterObject}*</span>; */ -public class PathItemObject extends ASTNode<ASTNode> implements Cloneable { +public class PathItem extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:243 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:248 */ - public static Path composePath (PathItemObject pathItemObject){ + public static Path composePath (PathItem pathItem){ Path path = new Path(); - if( !pathItemObject.getSummary().isEmpty()) - path.setSummary(pathItemObject.getSummary()); - if( !pathItemObject.getDescription().isEmpty() ) - path.setDescription(pathItemObject.getDescription()); - if( pathItemObject.hasGet() ) - path.setGet( OperationObject.composeOperation(pathItemObject.getGet().getOperationObject()) ); - if( pathItemObject.hasPut() ) - path.setPut( OperationObject.composeOperation(pathItemObject.getPut().getOperationObject()) ); - if( pathItemObject.hasPost() ) - path.setPost( OperationObject.composeOperation(pathItemObject.getPost().getOperationObject()) ); - if( pathItemObject.hasDelete() ) - path.setDelete( OperationObject.composeOperation(pathItemObject.getDelete().getOperationObject()) ); - if( pathItemObject.hasOptions() ) - path.setOptions( OperationObject.composeOperation(pathItemObject.getOptions().getOperationObject()) ); - if( pathItemObject.hasHead() ) - path.setHead( OperationObject.composeOperation(pathItemObject.getHead().getOperationObject()) ); - if( pathItemObject.hasPatch() ) - path.setPatch( OperationObject.composeOperation(pathItemObject.getPatch().getOperationObject()) ); - if( pathItemObject.getNumServerObject() != 0 ){ - for( ServerObject s : pathItemObject.getServerObjects() ) + + if( !pathItem.getRef().isEmpty() ) + path.setRef(pathItem.getRef()); + if( !pathItem.getSummary().isEmpty()) + path.setSummary(pathItem.getSummary()); + if( !pathItem.getDescription().isEmpty() ) + path.setDescription(pathItem.getDescription()); + if( pathItem.hasGet() ) + path.setGet( OperationObject.composeOperation(pathItem.getGet().getOperationObject()) ); + if( pathItem.hasPut() ) + path.setPut( OperationObject.composeOperation(pathItem.getPut().getOperationObject()) ); + if( pathItem.hasPost() ) + path.setPost( OperationObject.composeOperation(pathItem.getPost().getOperationObject()) ); + if( pathItem.hasDelete() ) + path.setDelete( OperationObject.composeOperation(pathItem.getDelete().getOperationObject()) ); + if( pathItem.hasOptions() ) + path.setOptions( OperationObject.composeOperation(pathItem.getOptions().getOperationObject()) ); + if( pathItem.hasHead() ) + path.setHead( OperationObject.composeOperation(pathItem.getHead().getOperationObject()) ); + if( pathItem.hasPatch() ) + path.setPatch( OperationObject.composeOperation(pathItem.getPatch().getOperationObject()) ); + if( pathItem.getNumServerObject() != 0 ){ + for( ServerObject s : pathItem.getServerObjects() ) path.addServer( ServerObject.composeServer(s) ); } - if( pathItemObject.getNumParameterObject() != 0 ){ - for( ParameterObject p : pathItemObject.getParameterObjects() ) + if( pathItem.getNumParameterObject() != 0 ){ + for( ParameterObject p : pathItem.getParameterObjects() ) path.addParameter( ParameterObject.composeParameter(p) ); } @@ -53,79 +57,80 @@ public class PathItemObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:275 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:261 */ - public static PathItemObject parsePath(Path path){ - PathItemObject pathItemObject = new PathItemObject(); + public static PathItem parsePath(Path path){ + PathItem pathItem = new PathItem(); + if( path.getRef() != null ) - pathItemObject.setRef( path.getRef() ); + pathItem.setRef(path.getRef()); if( path.getSummary() != null ) - pathItemObject.setSummary( path.getSummary() ); + pathItem.setSummary(path.getSummary()); if( path.getDescription() != null ) - pathItemObject.setDescription( path.getDescription() ); + pathItem.setDescription(path.getDescription()); if( path.getGet() != null ){ Get get = new Get(); get.setOperationObject( OperationObject.parseOperation( path.getGet() ) ); - pathItemObject.setGet(get); + pathItem.setGet(get); } if( path.getPut() != null ){ Put put = new Put(); put.setOperationObject( OperationObject.parseOperation( path.getPut() ) ); - pathItemObject.setPut(put); + pathItem.setPut(put); } if( path.getPost() != null ){ Post post = new Post(); post.setOperationObject( OperationObject.parseOperation( path.getPost() ) ); - pathItemObject.setPost(post); + pathItem.setPost(post); } if( path.getDelete() != null ){ Delete delete = new Delete(); delete.setOperationObject( OperationObject.parseOperation( path.getDelete() ) ); - pathItemObject.setDelete(delete); + pathItem.setDelete(delete); } if( path.getOptions() != null ){ Options options = new Options(); options.setOperationObject( OperationObject.parseOperation( path.getOptions() ) ); - pathItemObject.setOptions(options); + pathItem.setOptions(options); } if( path.getHead() != null ){ Head head = new Head(); head.setOperationObject( OperationObject.parseOperation( path.getHead() ) ); - pathItemObject.setHead(head); + pathItem.setHead(head); } if( path.getPatch() != null ){ Patch patch = new Patch(); patch.setOperationObject( OperationObject.parseOperation( path.getPatch() ) ); - pathItemObject.setPatch(patch); + pathItem.setPatch(patch); } if( path.getTrace() != null ){ Trace trace = new Trace(); trace.setOperationObject( OperationObject.parseOperation( path.getTrace() ) ); - pathItemObject.setTrace(trace); + pathItem.setTrace(trace); } if( path.getServers() != null ){ for(Server s : path.getServers()) - pathItemObject.addServerObject( ServerObject.parseServer(s)); + pathItem.addServerObject( ServerObject.parseServer(s)); } if( path.getParameters() != null ){ for(Parameter p : path.getParameters()){ if( p.isRef() ) { ParameterObject parameterObject = new ParameterObject(); parameterObject.setRef(p.getRef()); - pathItemObject.addParameterObject(parameterObject); + pathItem.addParameterObject(parameterObject); } else - pathItemObject.addParameterObject(ParameterObject.parseParameter(p)); + pathItem.addParameterObject(ParameterObject.parseParameter(p)); } } - return pathItemObject; + return pathItem; } /** * @declaredat ASTNode:1 */ - public PathItemObject() { + public PathItem() { super(); } /** @@ -156,7 +161,7 @@ public class PathItemObject extends ASTNode<ASTNode> implements Cloneable { type = {"String", "String", "String", "Opt<Get>", "Opt<Put>", "Opt<Post>", "Opt<Delete>", "Opt<Options>", "Opt<Head>", "Opt<Patch>", "Opt<Trace>", "JastAddList<ServerObject>", "JastAddList<ParameterObject>"}, kind = {"Token", "Token", "Token", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "List", "List"} ) - public PathItemObject(String p0, String p1, String p2, Opt<Get> p3, Opt<Put> p4, Opt<Post> p5, Opt<Delete> p6, Opt<Options> p7, Opt<Head> p8, Opt<Patch> p9, Opt<Trace> p10, JastAddList<ServerObject> p11, JastAddList<ParameterObject> p12) { + public PathItem(String p0, String p1, String p2, Opt<Get> p3, Opt<Put> p4, Opt<Post> p5, Opt<Delete> p6, Opt<Options> p7, Opt<Head> p8, Opt<Patch> p9, Opt<Trace> p10, JastAddList<ServerObject> p11, JastAddList<ParameterObject> p12) { setRef(p0); setSummary(p1); setDescription(p2); @@ -199,16 +204,16 @@ public class PathItemObject extends ASTNode<ASTNode> implements Cloneable { /** @apilevel internal * @declaredat ASTNode:62 */ - public PathItemObject clone() throws CloneNotSupportedException { - PathItemObject node = (PathItemObject) super.clone(); + public PathItem clone() throws CloneNotSupportedException { + PathItem node = (PathItem) super.clone(); return node; } /** @apilevel internal * @declaredat ASTNode:67 */ - public PathItemObject copy() { + public PathItem copy() { try { - PathItemObject node = (PathItemObject) clone(); + PathItem node = (PathItem) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); @@ -227,7 +232,7 @@ public class PathItemObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:86 */ @Deprecated - public PathItemObject fullCopy() { + public PathItem fullCopy() { return treeCopyNoTransform(); } /** @@ -237,8 +242,8 @@ public class PathItemObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level * @declaredat ASTNode:96 */ - public PathItemObject treeCopyNoTransform() { - PathItemObject tree = (PathItemObject) copy(); + public PathItem treeCopyNoTransform() { + PathItem tree = (PathItem) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; @@ -258,8 +263,8 @@ public class PathItemObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level * @declaredat ASTNode:116 */ - public PathItemObject treeCopy() { - PathItemObject tree = (PathItemObject) copy(); + public PathItem treeCopy() { + PathItem tree = (PathItem) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); @@ -275,7 +280,7 @@ public class PathItemObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:130 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Ref == ((PathItemObject) node).tokenString_Ref) && (tokenString_Summary == ((PathItemObject) node).tokenString_Summary) && (tokenString_Description == ((PathItemObject) node).tokenString_Description); + return super.is$Equal(node) && (tokenString_Ref == ((PathItem) node).tokenString_Ref) && (tokenString_Summary == ((PathItem) node).tokenString_Summary) && (tokenString_Description == ((PathItem) node).tokenString_Description); } /** * Replaces the lexeme Ref. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/PathsObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathsObject.java index 768d3e8f07eac358712eec7e43edcf2536875ae6..9987c0aea88f857c99dafd9aba321a8091cc0e93 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/PathsObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathsObject.java @@ -4,31 +4,18 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:3 - * @astdecl PathsObject : ASTNode ::= <Ref:String> PathItemObject; - * @production PathsObject : {@link ASTNode} ::= <span class="component"><Ref:String></span> <span class="component">{@link PathItemObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:35 + * @astdecl PathsObject : ASTNode ::= <Ref:String> PathItem; + * @production PathsObject : {@link ASTNode} ::= <span class="component"><Ref:String></span> <span class="component">{@link PathItem}</span>; */ public class PathsObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:264 - */ - public static PathsObject parsePaths(OpenApi3 api3){ - PathsObject pathsObject = new PathsObject(); - - for ( String key : api3.getPaths().keySet() ){ - pathsObject.setRef( key ); - pathsObject.setPathItemObject( PathItemObject.parsePath(api3.getPath(key)) ); - } - - return pathsObject; - } /** * @declaredat ASTNode:1 */ @@ -49,11 +36,11 @@ public class PathsObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Ref", "PathItemObject"}, - type = {"String", "PathItemObject"}, + name = {"Ref", "PathItem"}, + type = {"String", "PathItem"}, kind = {"Token", "Child"} ) - public PathsObject(String p0, PathItemObject p1) { + public PathsObject(String p0, PathItem p1) { setRef(p0); setChild(p1, 0); } @@ -184,30 +171,30 @@ public class PathsObject extends ASTNode<ASTNode> implements Cloneable { return tokenString_Ref != null ? tokenString_Ref : ""; } /** - * Replaces the PathItemObject child. - * @param node The new node to replace the PathItemObject child. + * Replaces the PathItem child. + * @param node The new node to replace the PathItem child. * @apilevel high-level */ - public void setPathItemObject(PathItemObject node) { + public void setPathItem(PathItem node) { setChild(node, 0); } /** - * Retrieves the PathItemObject child. - * @return The current node used as the PathItemObject child. + * Retrieves the PathItem child. + * @return The current node used as the PathItem child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="PathItemObject") - public PathItemObject getPathItemObject() { - return (PathItemObject) getChild(0); + @ASTNodeAnnotation.Child(name="PathItem") + public PathItem getPathItem() { + return (PathItem) getChild(0); } /** - * Retrieves the PathItemObject child. + * Retrieves the PathItem child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the PathItemObject child. + * @return The current node used as the PathItem child. * @apilevel low-level */ - public PathItemObject getPathItemObjectNoTransform() { - return (PathItemObject) getChildNoTransform(0); + public PathItem getPathItemNoTransform() { + return (PathItem) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Post.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Post.java index 4e3b60b7b94b7f0549c0278d05650b078ac61595..fb9bcc86ce662fafbedd99034c6eb92922de9143 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Post.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Post.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:66 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:41 * @astdecl Post : ASTNode ::= OperationObject; * @production Post : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/PropertyItem.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/PropertyItem.java index ffc2695e6fce1d99bbacc3aea001de47c916a877..f4fb133605574ea123ffdbb75c51961f5aa0fa17 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/PropertyItem.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/PropertyItem.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:134 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:96 * @astdecl PropertyItem : ASTNode ::= <Name:String> SchemaObject; * @production PropertyItem : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component">{@link SchemaObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Put.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Put.java index 2772971bbdad2f5ef62a0650966c05a3f2ba7215..877f964ea33a514b18f9f54358e10fba0f62003b 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Put.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Put.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:65 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:40 * @astdecl Put : ASTNode ::= OperationObject; * @production Put : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodiesTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodiesTuple.java deleted file mode 100644 index f8b1416f41f74b7bcf622c3cc0e50977143afe8a..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodiesTuple.java +++ /dev/null @@ -1,100 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:42 - * @astdecl RequestBodiesTuple : ASTNode; - * @production RequestBodiesTuple : {@link ASTNode}; - - */ -public abstract class RequestBodiesTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public RequestBodiesTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** @apilevel low-level - * @declaredat ASTNode:13 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:19 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:23 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:27 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public RequestBodiesTuple clone() throws CloneNotSupportedException { - RequestBodiesTuple node = (RequestBodiesTuple) super.clone(); - return node; - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:42 - */ - @Deprecated - public abstract RequestBodiesTuple fullCopy(); - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:50 - */ - public abstract RequestBodiesTuple treeCopyNoTransform(); - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:58 - */ - public abstract RequestBodiesTuple treeCopy(); - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObject.java index 2073e618eece6844a716084bc2ac200ef0ec1af5..b405309eaaf460181e2a61afa371599d3ef912ee 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObject.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:77 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:60 * @astdecl RequestBodyObject : ASTNode ::= <Description:String> ContentTuple* <Required:Boolean> <Ref:String>; * @production RequestBodyObject : {@link ASTNode} ::= <span class="component"><Description:String></span> <span class="component">{@link ContentTuple}*</span> <span class="component"><Required:Boolean></span> <span class="component"><Ref:String></span>; @@ -17,41 +18,43 @@ import java.net.URL; public class RequestBodyObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:383 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:398 */ public static org.openapi4j.parser.model.v3.RequestBody composeRequestBody (RequestBodyObject requestBodyObject){ org.openapi4j.parser.model.v3.RequestBody requestBody = new org.openapi4j.parser.model.v3.RequestBody(); - Map<String, MediaType> contents = new HashMap<>(); - for( ContentTuple t : requestBodyObject.getContentTuples() ) - contents.put( ((ContentObjectTuple)t).getName(), MediaTypeObject.composeMediaType( ((ContentObjectTuple)t).getMediaTypeObject() ) ); + if( requestBodyObject.getNumContentTuple() != 0 ){ + Map<String, MediaType> contents = new HashMap<>(); + for( ContentTuple t : requestBodyObject.getContentTuples()) + contents.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); requestBody.setContentMediaTypes(contents); + } if( !requestBodyObject.getDescription().isEmpty() ) requestBody.setDescription(requestBodyObject.getDescription()); if( requestBodyObject.getRequired() != null ) requestBody.setRequired(requestBodyObject.getRequired()); if( !requestBodyObject.getRef().isEmpty() ) - requestBody.setRef(requestBodyObject.getRef()); + requestBody.setRef(requestBodyObject.getRef()); return requestBody; } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:453 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:429 */ public static RequestBodyObject parseRequestBody(org.openapi4j.parser.model.v3.RequestBody requestBody){ RequestBodyObject requestBodyObject = new RequestBodyObject(); if( requestBody.getContentMediaTypes() != null ) { for (String key : requestBody.getContentMediaTypes().keySet()) - requestBodyObject.addContentTuple(new ContentObjectTuple(key, MediaTypeObject.parseMediaType(requestBody.getContentMediaType(key)))); + requestBodyObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(requestBody.getContentMediaType(key)))); } if( requestBody.getDescription() != null ) requestBodyObject.setDescription(requestBody.getDescription()); if( requestBody.getRequired() != null ) requestBodyObject.setRequired( requestBody.getRequired() ); if( requestBody.isRef() ) - requestBodyObject.setRef(requestBody.getRef()); + requestBodyObject.setRef(requestBody.getRef()); return requestBodyObject; } diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyReferenceTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyReferenceTuple.java deleted file mode 100644 index e3470b0736cb705576d066525756d34e51131cb6..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyReferenceTuple.java +++ /dev/null @@ -1,199 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:44 - * @astdecl RequestBodyReferenceTuple : RequestBodiesTuple ::= <Name:String> <Ref:String>; - * @production RequestBodyReferenceTuple : {@link RequestBodiesTuple} ::= <span class="component"><Name:String></span> <span class="component"><Ref:String></span>; - - */ -public class RequestBodyReferenceTuple extends RequestBodiesTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public RequestBodyReferenceTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Ref"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public RequestBodyReferenceTuple(String p0, String p1) { - setName(p0); - setRef(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public RequestBodyReferenceTuple clone() throws CloneNotSupportedException { - RequestBodyReferenceTuple node = (RequestBodyReferenceTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public RequestBodyReferenceTuple copy() { - try { - RequestBodyReferenceTuple node = (RequestBodyReferenceTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public RequestBodyReferenceTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public RequestBodyReferenceTuple treeCopyNoTransform() { - RequestBodyReferenceTuple tree = (RequestBodyReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public RequestBodyReferenceTuple treeCopy() { - RequestBodyReferenceTuple tree = (RequestBodyReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((RequestBodyReferenceTuple) node).tokenString_Name) && (tokenString_Ref == ((RequestBodyReferenceTuple) node).tokenString_Ref); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObjectTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyTuple.java similarity index 72% rename from src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObjectTuple.java rename to src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyTuple.java index 37d62a182c0757956ea019d8ba0ed51707ab88b0..5b34c52cfd668567b4ebaecb980e8006bffe4da9 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObjectTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyTuple.java @@ -4,21 +4,22 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:43 - * @astdecl RequestBodyObjectTuple : RequestBodiesTuple ::= <Name:String> RequestBodyObject; - * @production RequestBodyObjectTuple : {@link RequestBodiesTuple} ::= <span class="component"><Name:String></span> <span class="component">{@link RequestBodyObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:27 + * @astdecl RequestBodyTuple : ASTNode ::= <Key:String> RequestBodyObject; + * @production RequestBodyTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link RequestBodyObject}</span>; */ -public class RequestBodyObjectTuple extends RequestBodiesTuple implements Cloneable { +public class RequestBodyTuple extends ASTNode<ASTNode> implements Cloneable { /** * @declaredat ASTNode:1 */ - public RequestBodyObjectTuple() { + public RequestBodyTuple() { super(); } /** @@ -35,12 +36,12 @@ public class RequestBodyObjectTuple extends RequestBodiesTuple implements Clonea * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "RequestBodyObject"}, + name = {"Key", "RequestBodyObject"}, type = {"String", "RequestBodyObject"}, kind = {"Token", "Child"} ) - public RequestBodyObjectTuple(String p0, RequestBodyObject p1) { - setName(p0); + public RequestBodyTuple(String p0, RequestBodyObject p1) { + setKey(p0); setChild(p1, 0); } /** @apilevel low-level @@ -71,16 +72,16 @@ public class RequestBodyObjectTuple extends RequestBodiesTuple implements Clonea /** @apilevel internal * @declaredat ASTNode:41 */ - public RequestBodyObjectTuple clone() throws CloneNotSupportedException { - RequestBodyObjectTuple node = (RequestBodyObjectTuple) super.clone(); + public RequestBodyTuple clone() throws CloneNotSupportedException { + RequestBodyTuple node = (RequestBodyTuple) super.clone(); return node; } /** @apilevel internal * @declaredat ASTNode:46 */ - public RequestBodyObjectTuple copy() { + public RequestBodyTuple copy() { try { - RequestBodyObjectTuple node = (RequestBodyObjectTuple) clone(); + RequestBodyTuple node = (RequestBodyTuple) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); @@ -99,7 +100,7 @@ public class RequestBodyObjectTuple extends RequestBodiesTuple implements Clonea * @declaredat ASTNode:65 */ @Deprecated - public RequestBodyObjectTuple fullCopy() { + public RequestBodyTuple fullCopy() { return treeCopyNoTransform(); } /** @@ -109,8 +110,8 @@ public class RequestBodyObjectTuple extends RequestBodiesTuple implements Clonea * @apilevel low-level * @declaredat ASTNode:75 */ - public RequestBodyObjectTuple treeCopyNoTransform() { - RequestBodyObjectTuple tree = (RequestBodyObjectTuple) copy(); + public RequestBodyTuple treeCopyNoTransform() { + RequestBodyTuple tree = (RequestBodyTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; @@ -130,8 +131,8 @@ public class RequestBodyObjectTuple extends RequestBodiesTuple implements Clonea * @apilevel low-level * @declaredat ASTNode:95 */ - public RequestBodyObjectTuple treeCopy() { - RequestBodyObjectTuple tree = (RequestBodyObjectTuple) copy(); + public RequestBodyTuple treeCopy() { + RequestBodyTuple tree = (RequestBodyTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); @@ -147,27 +148,27 @@ public class RequestBodyObjectTuple extends RequestBodiesTuple implements Clonea * @declaredat ASTNode:109 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((RequestBodyObjectTuple) node).tokenString_Name); + return super.is$Equal(node) && (tokenString_Key == ((RequestBodyTuple) node).tokenString_Key); } /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. + * Replaces the lexeme Key. + * @param value The new value for the lexeme Key. * @apilevel high-level */ - public void setName(String value) { - tokenString_Name = value; + public void setKey(String value) { + tokenString_Key = value; } /** @apilevel internal */ - protected String tokenString_Name; + protected String tokenString_Key; /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. + * Retrieves the value for the lexeme Key. + * @return The value for the lexeme Key. * @apilevel high-level */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; + @ASTNodeAnnotation.Token(name="Key") + public String getKey() { + return tokenString_Key != null ? tokenString_Key : ""; } /** * Replaces the RequestBodyObject child. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequiredField.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequiredField.java index 972966181b4e93d2b1c91b3fb47037224f953912..7e6d0191ee089e64e57614481baa67201a28c118 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequiredField.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequiredField.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:135 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:97 * @astdecl RequiredField : ASTNode ::= <Value:String>; * @production RequiredField : {@link ASTNode} ::= <span class="component"><Value:String></span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObject.java index e886c40bd9d9b9d9c3b978a400acd58b0f5842f8..97395870ec64205a1115f2a8eacbc5ba00f044cd 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObject.java @@ -4,66 +4,72 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:105 - * @astdecl ResponseObject : HTTPStatusCode ::= <Name:String> <Description:String> HeadersTuple* ContentTuple* LinksTuple*; - * @production ResponseObject : {@link HTTPStatusCode} ::= <span class="component"><Name:String></span> <span class="component"><Description:String></span> <span class="component">{@link HeadersTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component">{@link LinksTuple}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:70 + * @astdecl ResponseObject : ASTNode ::= <Ref:String> <Description:String> HeaderTuple* ContentTuple* LinkTuple*; + * @production ResponseObject : {@link ASTNode} ::= <span class="component"><Ref:String></span> <span class="component"><Description:String></span> <span class="component">{@link HeaderTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component">{@link LinkTuple}*</span>; */ -public class ResponseObject extends HTTPStatusCode implements Cloneable { +public class ResponseObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:445 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:465 */ public static Response composeResponse (ResponseObject responseObject){ Response response = new Response(); - response.setDescription( responseObject.getDescription() ); - - if( responseObject.getNumHeadersTuple() != 0 ){ + if( !responseObject.getRef().isEmpty() ) + response.setRef(responseObject.getRef()); + if( !responseObject.getDescription().isEmpty() ) + response.setDescription(responseObject.getDescription()); + if( responseObject.getNumHeaderTuple() != 0 ){ Map<String, Header> headers = new HashMap<>(); - for( HeadersTuple t : responseObject.getHeadersTuples() ) - headers.put( ((HeaderObjectTuple)t).getName(), HeaderObject.composeHeader( ((HeaderObjectTuple)t).getHeaderObject() ) ); + for( HeaderTuple t : responseObject.getHeaderTuples() ) + headers.put(t.getKey(), HeaderObject.composeHeader(t.getHeaderObject())); response.setHeaders(headers); } if( responseObject.getNumContentTuple() != 0 ){ Map<String, MediaType> contents = new HashMap<>(); for( ContentTuple t : responseObject.getContentTuples() ) - contents.put( ((ContentObjectTuple)t).getName(), MediaTypeObject.composeMediaType( ((ContentObjectTuple)t).getMediaTypeObject() ) ); + contents.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); response.setContentMediaTypes(contents); } - if( responseObject.getNumLinksTuple() != 0 ){ + if( responseObject.getNumLinkTuple() != 0 ){ Map<String, Link> links = new HashMap<>(); - for( LinksTuple t : responseObject.getLinksTuples() ) - links.put( ((LinkObjectTuple)t).getName(), LinkObject.composeLink( ((LinkObjectTuple)t).getLinkObject() ) ); + for( LinkTuple t : responseObject.getLinkTuples() ) + links.put(t.getKey(), LinkObject.composeLink(t.getLinkObject())); + response.setLinks(links); } return response; } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:510 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:486 */ public static ResponseObject parseResponse(Response response){ ResponseObject responseObject = new ResponseObject(); - responseObject.setDescription( response.getDescription() ); - + if( response.isRef() ) + responseObject.setRef(response.getRef()); + if( response.getDescription() != null ) + responseObject.setDescription(response.getDescription()); if( response.getHeaders() != null ){ for( String key : response.getHeaders().keySet() ) - responseObject.addHeadersTuple( new HeaderObjectTuple(key, HeaderObject.parseHeader(response.getHeader(key))) ); + responseObject.addHeaderTuple( new HeaderTuple(key, HeaderObject.parseHeader(response.getHeader(key))) ); } if( response.getContentMediaTypes() != null ){ for( String key : response.getContentMediaTypes().keySet() ) - responseObject.addContentTuple( new ContentObjectTuple(key, MediaTypeObject.parseMediaType(response.getContentMediaType(key))) ); + responseObject.addContentTuple( new ContentTuple(key, MediaTypeObject.parseMediaType(response.getContentMediaType(key))) ); } if( response.getLinks() != null ){ for( String key : response.getLinks().keySet() ) - responseObject.addLinksTuple( new LinkObjectTuple(key, LinkObject.parseLink(response.getLink(key))) ); + responseObject.addLinkTuple( new LinkTuple(key, LinkObject.parseLink(response.getLink(key))) ); } return responseObject; @@ -91,12 +97,12 @@ public class ResponseObject extends HTTPStatusCode implements Cloneable { * @declaredat ASTNode:16 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "Description", "HeadersTuple", "ContentTuple", "LinksTuple"}, - type = {"String", "String", "JastAddList<HeadersTuple>", "JastAddList<ContentTuple>", "JastAddList<LinksTuple>"}, + name = {"Ref", "Description", "HeaderTuple", "ContentTuple", "LinkTuple"}, + type = {"String", "String", "JastAddList<HeaderTuple>", "JastAddList<ContentTuple>", "JastAddList<LinkTuple>"}, kind = {"Token", "Token", "List", "List", "List"} ) - public ResponseObject(String p0, String p1, JastAddList<HeadersTuple> p2, JastAddList<ContentTuple> p3, JastAddList<LinksTuple> p4) { - setName(p0); + public ResponseObject(String p0, String p1, JastAddList<HeaderTuple> p2, JastAddList<ContentTuple> p3, JastAddList<LinkTuple> p4) { + setRef(p0); setDescription(p1); setChild(p2, 0); setChild(p3, 1); @@ -206,27 +212,27 @@ public class ResponseObject extends HTTPStatusCode implements Cloneable { * @declaredat ASTNode:115 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((ResponseObject) node).tokenString_Name) && (tokenString_Description == ((ResponseObject) node).tokenString_Description); + return super.is$Equal(node) && (tokenString_Ref == ((ResponseObject) node).tokenString_Ref) && (tokenString_Description == ((ResponseObject) node).tokenString_Description); } /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. + * Replaces the lexeme Ref. + * @param value The new value for the lexeme Ref. * @apilevel high-level */ - public void setName(String value) { - tokenString_Name = value; + public void setRef(String value) { + tokenString_Ref = value; } /** @apilevel internal */ - protected String tokenString_Name; + protected String tokenString_Ref; /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. + * Retrieves the value for the lexeme Ref. + * @return The value for the lexeme Ref. * @apilevel high-level */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; + @ASTNodeAnnotation.Token(name="Ref") + public String getRef() { + return tokenString_Ref != null ? tokenString_Ref : ""; } /** * Replaces the lexeme Description. @@ -249,114 +255,114 @@ public class ResponseObject extends HTTPStatusCode implements Cloneable { return tokenString_Description != null ? tokenString_Description : ""; } /** - * Replaces the HeadersTuple list. - * @param list The new list node to be used as the HeadersTuple list. + * Replaces the HeaderTuple list. + * @param list The new list node to be used as the HeaderTuple list. * @apilevel high-level */ - public void setHeadersTupleList(JastAddList<HeadersTuple> list) { + public void setHeaderTupleList(JastAddList<HeaderTuple> list) { setChild(list, 0); } /** - * Retrieves the number of children in the HeadersTuple list. - * @return Number of children in the HeadersTuple list. + * Retrieves the number of children in the HeaderTuple list. + * @return Number of children in the HeaderTuple list. * @apilevel high-level */ - public int getNumHeadersTuple() { - return getHeadersTupleList().getNumChild(); + public int getNumHeaderTuple() { + return getHeaderTupleList().getNumChild(); } /** - * Retrieves the number of children in the HeadersTuple list. + * Retrieves the number of children in the HeaderTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the HeadersTuple list. + * @return Number of children in the HeaderTuple list. * @apilevel low-level */ - public int getNumHeadersTupleNoTransform() { - return getHeadersTupleListNoTransform().getNumChildNoTransform(); + public int getNumHeaderTupleNoTransform() { + return getHeaderTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the HeadersTuple list. + * Retrieves the element at index {@code i} in the HeaderTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the HeadersTuple list. + * @return The element at position {@code i} in the HeaderTuple list. * @apilevel high-level */ - public HeadersTuple getHeadersTuple(int i) { - return (HeadersTuple) getHeadersTupleList().getChild(i); + public HeaderTuple getHeaderTuple(int i) { + return (HeaderTuple) getHeaderTupleList().getChild(i); } /** - * Check whether the HeadersTuple list has any children. + * Check whether the HeaderTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasHeadersTuple() { - return getHeadersTupleList().getNumChild() != 0; + public boolean hasHeaderTuple() { + return getHeaderTupleList().getNumChild() != 0; } /** - * Append an element to the HeadersTuple list. - * @param node The element to append to the HeadersTuple list. + * Append an element to the HeaderTuple list. + * @param node The element to append to the HeaderTuple list. * @apilevel high-level */ - public void addHeadersTuple(HeadersTuple node) { - JastAddList<HeadersTuple> list = (parent == null) ? getHeadersTupleListNoTransform() : getHeadersTupleList(); + public void addHeaderTuple(HeaderTuple node) { + JastAddList<HeaderTuple> list = (parent == null) ? getHeaderTupleListNoTransform() : getHeaderTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addHeadersTupleNoTransform(HeadersTuple node) { - JastAddList<HeadersTuple> list = getHeadersTupleListNoTransform(); + public void addHeaderTupleNoTransform(HeaderTuple node) { + JastAddList<HeaderTuple> list = getHeaderTupleListNoTransform(); list.addChild(node); } /** - * Replaces the HeadersTuple list element at index {@code i} with the new node {@code node}. + * Replaces the HeaderTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setHeadersTuple(HeadersTuple node, int i) { - JastAddList<HeadersTuple> list = getHeadersTupleList(); + public void setHeaderTuple(HeaderTuple node, int i) { + JastAddList<HeaderTuple> list = getHeaderTupleList(); list.setChild(node, i); } /** - * Retrieves the HeadersTuple list. - * @return The node representing the HeadersTuple list. + * Retrieves the HeaderTuple list. + * @return The node representing the HeaderTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="HeadersTuple") - public JastAddList<HeadersTuple> getHeadersTupleList() { - JastAddList<HeadersTuple> list = (JastAddList<HeadersTuple>) getChild(0); + @ASTNodeAnnotation.ListChild(name="HeaderTuple") + public JastAddList<HeaderTuple> getHeaderTupleList() { + JastAddList<HeaderTuple> list = (JastAddList<HeaderTuple>) getChild(0); return list; } /** - * Retrieves the HeadersTuple list. + * Retrieves the HeaderTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeadersTuple list. + * @return The node representing the HeaderTuple list. * @apilevel low-level */ - public JastAddList<HeadersTuple> getHeadersTupleListNoTransform() { - return (JastAddList<HeadersTuple>) getChildNoTransform(0); + public JastAddList<HeaderTuple> getHeaderTupleListNoTransform() { + return (JastAddList<HeaderTuple>) getChildNoTransform(0); } /** - * @return the element at index {@code i} in the HeadersTuple list without + * @return the element at index {@code i} in the HeaderTuple list without * triggering rewrites. */ - public HeadersTuple getHeadersTupleNoTransform(int i) { - return (HeadersTuple) getHeadersTupleListNoTransform().getChildNoTransform(i); + public HeaderTuple getHeaderTupleNoTransform(int i) { + return (HeaderTuple) getHeaderTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the HeadersTuple list. - * @return The node representing the HeadersTuple list. + * Retrieves the HeaderTuple list. + * @return The node representing the HeaderTuple list. * @apilevel high-level */ - public JastAddList<HeadersTuple> getHeadersTuples() { - return getHeadersTupleList(); + public JastAddList<HeaderTuple> getHeaderTuples() { + return getHeaderTupleList(); } /** - * Retrieves the HeadersTuple list. + * Retrieves the HeaderTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HeadersTuple list. + * @return The node representing the HeaderTuple list. * @apilevel low-level */ - public JastAddList<HeadersTuple> getHeadersTuplesNoTransform() { - return getHeadersTupleListNoTransform(); + public JastAddList<HeaderTuple> getHeaderTuplesNoTransform() { + return getHeaderTupleListNoTransform(); } /** * Replaces the ContentTuple list. @@ -469,114 +475,114 @@ public class ResponseObject extends HTTPStatusCode implements Cloneable { return getContentTupleListNoTransform(); } /** - * Replaces the LinksTuple list. - * @param list The new list node to be used as the LinksTuple list. + * Replaces the LinkTuple list. + * @param list The new list node to be used as the LinkTuple list. * @apilevel high-level */ - public void setLinksTupleList(JastAddList<LinksTuple> list) { + public void setLinkTupleList(JastAddList<LinkTuple> list) { setChild(list, 2); } /** - * Retrieves the number of children in the LinksTuple list. - * @return Number of children in the LinksTuple list. + * Retrieves the number of children in the LinkTuple list. + * @return Number of children in the LinkTuple list. * @apilevel high-level */ - public int getNumLinksTuple() { - return getLinksTupleList().getNumChild(); + public int getNumLinkTuple() { + return getLinkTupleList().getNumChild(); } /** - * Retrieves the number of children in the LinksTuple list. + * Retrieves the number of children in the LinkTuple list. * Calling this method will not trigger rewrites. - * @return Number of children in the LinksTuple list. + * @return Number of children in the LinkTuple list. * @apilevel low-level */ - public int getNumLinksTupleNoTransform() { - return getLinksTupleListNoTransform().getNumChildNoTransform(); + public int getNumLinkTupleNoTransform() { + return getLinkTupleListNoTransform().getNumChildNoTransform(); } /** - * Retrieves the element at index {@code i} in the LinksTuple list. + * Retrieves the element at index {@code i} in the LinkTuple list. * @param i Index of the element to return. - * @return The element at position {@code i} in the LinksTuple list. + * @return The element at position {@code i} in the LinkTuple list. * @apilevel high-level */ - public LinksTuple getLinksTuple(int i) { - return (LinksTuple) getLinksTupleList().getChild(i); + public LinkTuple getLinkTuple(int i) { + return (LinkTuple) getLinkTupleList().getChild(i); } /** - * Check whether the LinksTuple list has any children. + * Check whether the LinkTuple list has any children. * @return {@code true} if it has at least one child, {@code false} otherwise. * @apilevel high-level */ - public boolean hasLinksTuple() { - return getLinksTupleList().getNumChild() != 0; + public boolean hasLinkTuple() { + return getLinkTupleList().getNumChild() != 0; } /** - * Append an element to the LinksTuple list. - * @param node The element to append to the LinksTuple list. + * Append an element to the LinkTuple list. + * @param node The element to append to the LinkTuple list. * @apilevel high-level */ - public void addLinksTuple(LinksTuple node) { - JastAddList<LinksTuple> list = (parent == null) ? getLinksTupleListNoTransform() : getLinksTupleList(); + public void addLinkTuple(LinkTuple node) { + JastAddList<LinkTuple> list = (parent == null) ? getLinkTupleListNoTransform() : getLinkTupleList(); list.addChild(node); } /** @apilevel low-level */ - public void addLinksTupleNoTransform(LinksTuple node) { - JastAddList<LinksTuple> list = getLinksTupleListNoTransform(); + public void addLinkTupleNoTransform(LinkTuple node) { + JastAddList<LinkTuple> list = getLinkTupleListNoTransform(); list.addChild(node); } /** - * Replaces the LinksTuple list element at index {@code i} with the new node {@code node}. + * Replaces the LinkTuple list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level */ - public void setLinksTuple(LinksTuple node, int i) { - JastAddList<LinksTuple> list = getLinksTupleList(); + public void setLinkTuple(LinkTuple node, int i) { + JastAddList<LinkTuple> list = getLinkTupleList(); list.setChild(node, i); } /** - * Retrieves the LinksTuple list. - * @return The node representing the LinksTuple list. + * Retrieves the LinkTuple list. + * @return The node representing the LinkTuple list. * @apilevel high-level */ - @ASTNodeAnnotation.ListChild(name="LinksTuple") - public JastAddList<LinksTuple> getLinksTupleList() { - JastAddList<LinksTuple> list = (JastAddList<LinksTuple>) getChild(2); + @ASTNodeAnnotation.ListChild(name="LinkTuple") + public JastAddList<LinkTuple> getLinkTupleList() { + JastAddList<LinkTuple> list = (JastAddList<LinkTuple>) getChild(2); return list; } /** - * Retrieves the LinksTuple list. + * Retrieves the LinkTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the LinksTuple list. + * @return The node representing the LinkTuple list. * @apilevel low-level */ - public JastAddList<LinksTuple> getLinksTupleListNoTransform() { - return (JastAddList<LinksTuple>) getChildNoTransform(2); + public JastAddList<LinkTuple> getLinkTupleListNoTransform() { + return (JastAddList<LinkTuple>) getChildNoTransform(2); } /** - * @return the element at index {@code i} in the LinksTuple list without + * @return the element at index {@code i} in the LinkTuple list without * triggering rewrites. */ - public LinksTuple getLinksTupleNoTransform(int i) { - return (LinksTuple) getLinksTupleListNoTransform().getChildNoTransform(i); + public LinkTuple getLinkTupleNoTransform(int i) { + return (LinkTuple) getLinkTupleListNoTransform().getChildNoTransform(i); } /** - * Retrieves the LinksTuple list. - * @return The node representing the LinksTuple list. + * Retrieves the LinkTuple list. + * @return The node representing the LinkTuple list. * @apilevel high-level */ - public JastAddList<LinksTuple> getLinksTuples() { - return getLinksTupleList(); + public JastAddList<LinkTuple> getLinkTuples() { + return getLinkTupleList(); } /** - * Retrieves the LinksTuple list. + * Retrieves the LinkTuple list. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the LinksTuple list. + * @return The node representing the LinkTuple list. * @apilevel low-level */ - public JastAddList<LinksTuple> getLinksTuplesNoTransform() { - return getLinksTupleListNoTransform(); + public JastAddList<LinkTuple> getLinkTuplesNoTransform() { + return getLinkTupleListNoTransform(); } /** @apilevel internal */ public ASTNode rewriteTo() { diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseReferenceTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseReferenceTuple.java deleted file mode 100644 index 913ca0490e386fe21ef0612ce2465b02dea91b49..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseReferenceTuple.java +++ /dev/null @@ -1,199 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:35 - * @astdecl ResponseReferenceTuple : ResponsesTuple ::= <Name:String> <Ref:String>; - * @production ResponseReferenceTuple : {@link ResponsesTuple} ::= <span class="component"><Name:String></span> <span class="component"><Ref:String></span>; - - */ -public class ResponseReferenceTuple extends ResponsesTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ResponseReferenceTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Ref"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public ResponseReferenceTuple(String p0, String p1) { - setName(p0); - setRef(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public ResponseReferenceTuple clone() throws CloneNotSupportedException { - ResponseReferenceTuple node = (ResponseReferenceTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public ResponseReferenceTuple copy() { - try { - ResponseReferenceTuple node = (ResponseReferenceTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public ResponseReferenceTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public ResponseReferenceTuple treeCopyNoTransform() { - ResponseReferenceTuple tree = (ResponseReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public ResponseReferenceTuple treeCopy() { - ResponseReferenceTuple tree = (ResponseReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((ResponseReferenceTuple) node).tokenString_Name) && (tokenString_Ref == ((ResponseReferenceTuple) node).tokenString_Ref); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObjectTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseTuple.java similarity index 73% rename from src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObjectTuple.java rename to src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseTuple.java index 4b8d4840b388b8e1f7715b9d6dfe3412e31c52c7..cb4f190f8438f55a07aba4fe87970894a7027a43 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObjectTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseTuple.java @@ -4,21 +4,22 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:34 - * @astdecl ResponseObjectTuple : ResponsesTuple ::= <Name:String> ResponseObject; - * @production ResponseObjectTuple : {@link ResponsesTuple} ::= <span class="component"><Name:String></span> <span class="component">{@link ResponseObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:24 + * @astdecl ResponseTuple : ASTNode ::= <Key:String> ResponseObject; + * @production ResponseTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link ResponseObject}</span>; */ -public class ResponseObjectTuple extends ResponsesTuple implements Cloneable { +public class ResponseTuple extends ASTNode<ASTNode> implements Cloneable { /** * @declaredat ASTNode:1 */ - public ResponseObjectTuple() { + public ResponseTuple() { super(); } /** @@ -35,12 +36,12 @@ public class ResponseObjectTuple extends ResponsesTuple implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "ResponseObject"}, + name = {"Key", "ResponseObject"}, type = {"String", "ResponseObject"}, kind = {"Token", "Child"} ) - public ResponseObjectTuple(String p0, ResponseObject p1) { - setName(p0); + public ResponseTuple(String p0, ResponseObject p1) { + setKey(p0); setChild(p1, 0); } /** @apilevel low-level @@ -71,16 +72,16 @@ public class ResponseObjectTuple extends ResponsesTuple implements Cloneable { /** @apilevel internal * @declaredat ASTNode:41 */ - public ResponseObjectTuple clone() throws CloneNotSupportedException { - ResponseObjectTuple node = (ResponseObjectTuple) super.clone(); + public ResponseTuple clone() throws CloneNotSupportedException { + ResponseTuple node = (ResponseTuple) super.clone(); return node; } /** @apilevel internal * @declaredat ASTNode:46 */ - public ResponseObjectTuple copy() { + public ResponseTuple copy() { try { - ResponseObjectTuple node = (ResponseObjectTuple) clone(); + ResponseTuple node = (ResponseTuple) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); @@ -99,7 +100,7 @@ public class ResponseObjectTuple extends ResponsesTuple implements Cloneable { * @declaredat ASTNode:65 */ @Deprecated - public ResponseObjectTuple fullCopy() { + public ResponseTuple fullCopy() { return treeCopyNoTransform(); } /** @@ -109,8 +110,8 @@ public class ResponseObjectTuple extends ResponsesTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:75 */ - public ResponseObjectTuple treeCopyNoTransform() { - ResponseObjectTuple tree = (ResponseObjectTuple) copy(); + public ResponseTuple treeCopyNoTransform() { + ResponseTuple tree = (ResponseTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; @@ -130,8 +131,8 @@ public class ResponseObjectTuple extends ResponsesTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:95 */ - public ResponseObjectTuple treeCopy() { - ResponseObjectTuple tree = (ResponseObjectTuple) copy(); + public ResponseTuple treeCopy() { + ResponseTuple tree = (ResponseTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); @@ -147,27 +148,27 @@ public class ResponseObjectTuple extends ResponsesTuple implements Cloneable { * @declaredat ASTNode:109 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((ResponseObjectTuple) node).tokenString_Name); + return super.is$Equal(node) && (tokenString_Key == ((ResponseTuple) node).tokenString_Key); } /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. + * Replaces the lexeme Key. + * @param value The new value for the lexeme Key. * @apilevel high-level */ - public void setName(String value) { - tokenString_Name = value; + public void setKey(String value) { + tokenString_Key = value; } /** @apilevel internal */ - protected String tokenString_Name; + protected String tokenString_Key; /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. + * Retrieves the value for the lexeme Key. + * @return The value for the lexeme Key. * @apilevel high-level */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; + @ASTNodeAnnotation.Token(name="Key") + public String getKey() { + return tokenString_Key != null ? tokenString_Key : ""; } /** * Replaces the ResponseObject child. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponsesObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponsesObject.java deleted file mode 100644 index 1ae90b38c2397a81893aa2037ed3489ba0da45dd..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponsesObject.java +++ /dev/null @@ -1,270 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:103 - * @astdecl ResponsesObject : ASTNode ::= HTTPStatusCode*; - * @production ResponsesObject : {@link ASTNode} ::= <span class="component">{@link HTTPStatusCode}*</span>; - - */ -public class ResponsesObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ResponsesObject() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - children = new ASTNode[1]; - setChild(new JastAddList(), 0); - } - /** - * @declaredat ASTNode:14 - */ - @ASTNodeAnnotation.Constructor( - name = {"HTTPStatusCode"}, - type = {"JastAddList<HTTPStatusCode>"}, - kind = {"List"} - ) - public ResponsesObject(JastAddList<HTTPStatusCode> p0) { - setChild(p0, 0); - } - /** @apilevel low-level - * @declaredat ASTNode:23 - */ - protected int numChildren() { - return 1; - } - /** - * @apilevel internal - * @declaredat ASTNode:29 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:33 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:37 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:41 - */ - public ResponsesObject clone() throws CloneNotSupportedException { - ResponsesObject node = (ResponsesObject) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:46 - */ - public ResponsesObject copy() { - try { - ResponsesObject node = (ResponsesObject) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:65 - */ - @Deprecated - public ResponsesObject fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:75 - */ - public ResponsesObject treeCopyNoTransform() { - ResponsesObject tree = (ResponsesObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:95 - */ - public ResponsesObject treeCopy() { - ResponsesObject tree = (ResponsesObject) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:109 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node); - } - /** - * Replaces the HTTPStatusCode list. - * @param list The new list node to be used as the HTTPStatusCode list. - * @apilevel high-level - */ - public void setHTTPStatusCodeList(JastAddList<HTTPStatusCode> list) { - setChild(list, 0); - } - /** - * Retrieves the number of children in the HTTPStatusCode list. - * @return Number of children in the HTTPStatusCode list. - * @apilevel high-level - */ - public int getNumHTTPStatusCode() { - return getHTTPStatusCodeList().getNumChild(); - } - /** - * Retrieves the number of children in the HTTPStatusCode list. - * Calling this method will not trigger rewrites. - * @return Number of children in the HTTPStatusCode list. - * @apilevel low-level - */ - public int getNumHTTPStatusCodeNoTransform() { - return getHTTPStatusCodeListNoTransform().getNumChildNoTransform(); - } - /** - * Retrieves the element at index {@code i} in the HTTPStatusCode list. - * @param i Index of the element to return. - * @return The element at position {@code i} in the HTTPStatusCode list. - * @apilevel high-level - */ - public HTTPStatusCode getHTTPStatusCode(int i) { - return (HTTPStatusCode) getHTTPStatusCodeList().getChild(i); - } - /** - * Check whether the HTTPStatusCode list has any children. - * @return {@code true} if it has at least one child, {@code false} otherwise. - * @apilevel high-level - */ - public boolean hasHTTPStatusCode() { - return getHTTPStatusCodeList().getNumChild() != 0; - } - /** - * Append an element to the HTTPStatusCode list. - * @param node The element to append to the HTTPStatusCode list. - * @apilevel high-level - */ - public void addHTTPStatusCode(HTTPStatusCode node) { - JastAddList<HTTPStatusCode> list = (parent == null) ? getHTTPStatusCodeListNoTransform() : getHTTPStatusCodeList(); - list.addChild(node); - } - /** @apilevel low-level - */ - public void addHTTPStatusCodeNoTransform(HTTPStatusCode node) { - JastAddList<HTTPStatusCode> list = getHTTPStatusCodeListNoTransform(); - list.addChild(node); - } - /** - * Replaces the HTTPStatusCode list element at index {@code i} with the new node {@code node}. - * @param node The new node to replace the old list element. - * @param i The list index of the node to be replaced. - * @apilevel high-level - */ - public void setHTTPStatusCode(HTTPStatusCode node, int i) { - JastAddList<HTTPStatusCode> list = getHTTPStatusCodeList(); - list.setChild(node, i); - } - /** - * Retrieves the HTTPStatusCode list. - * @return The node representing the HTTPStatusCode list. - * @apilevel high-level - */ - @ASTNodeAnnotation.ListChild(name="HTTPStatusCode") - public JastAddList<HTTPStatusCode> getHTTPStatusCodeList() { - JastAddList<HTTPStatusCode> list = (JastAddList<HTTPStatusCode>) getChild(0); - return list; - } - /** - * Retrieves the HTTPStatusCode list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HTTPStatusCode list. - * @apilevel low-level - */ - public JastAddList<HTTPStatusCode> getHTTPStatusCodeListNoTransform() { - return (JastAddList<HTTPStatusCode>) getChildNoTransform(0); - } - /** - * @return the element at index {@code i} in the HTTPStatusCode list without - * triggering rewrites. - */ - public HTTPStatusCode getHTTPStatusCodeNoTransform(int i) { - return (HTTPStatusCode) getHTTPStatusCodeListNoTransform().getChildNoTransform(i); - } - /** - * Retrieves the HTTPStatusCode list. - * @return The node representing the HTTPStatusCode list. - * @apilevel high-level - */ - public JastAddList<HTTPStatusCode> getHTTPStatusCodes() { - return getHTTPStatusCodeList(); - } - /** - * Retrieves the HTTPStatusCode list. - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The node representing the HTTPStatusCode list. - * @apilevel low-level - */ - public JastAddList<HTTPStatusCode> getHTTPStatusCodesNoTransform() { - return getHTTPStatusCodeListNoTransform(); - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponsesTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponsesTuple.java deleted file mode 100644 index a9c7654b3517b7f69d2d067166feb5393ce779ee..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponsesTuple.java +++ /dev/null @@ -1,100 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:33 - * @astdecl ResponsesTuple : ASTNode; - * @production ResponsesTuple : {@link ASTNode}; - - */ -public abstract class ResponsesTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public ResponsesTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** @apilevel low-level - * @declaredat ASTNode:13 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:19 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:23 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:27 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public ResponsesTuple clone() throws CloneNotSupportedException { - ResponsesTuple node = (ResponsesTuple) super.clone(); - return node; - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:42 - */ - @Deprecated - public abstract ResponsesTuple fullCopy(); - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:50 - */ - public abstract ResponsesTuple treeCopyNoTransform(); - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:58 - */ - public abstract ResponsesTuple treeCopy(); - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObject.java index 34c3c00bc6a4193a01565f711e7f405f42a22867..b787c586a65804f0775800eaf1df0b77ed448df2 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObject.java @@ -4,70 +4,77 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:85 - * @astdecl SchemaObject : ASTNode ::= [AdditionalProperties] <AdditionalPropertiesAllowed:Object> <DefaultValue:Object> <Description:String> <DeprecatedBoolean:Object> [DiscriminatorObject] EnumObj* <Example:Object> <ExclusiveMaximum:Object> <ExclusiveMinimum:Object> [ExternalDocumentationObject] <Format:String> [ItemsSchema] <Maximum:Object> <Minimum:Object> <MaxItems:Object> <MinItems:Object> <MaxLength:Object> <MinLength:Object> <MaxProperties:Object> <MinProperties:Object> <MultipleOf:Object> [NotSchema] <Nullable:Object> <Pattern:String> PropertyItem* RequiredField* AllOfSchema* AnyOfSchema* OneOfSchema* <ReadOnly:Object> <WriteOnly:Object> <Type:String> <Title:String> <UniqueItems:Object> [XmlObject] <Ref:String>; - * @production SchemaObject : {@link ASTNode} ::= <span class="component">[{@link AdditionalProperties}]</span> <span class="component"><AdditionalPropertiesAllowed:Object></span> <span class="component"><DefaultValue:Object></span> <span class="component"><Description:String></span> <span class="component"><DeprecatedBoolean:Object></span> <span class="component">[{@link DiscriminatorObject}]</span> <span class="component">{@link EnumObj}*</span> <span class="component"><Example:Object></span> <span class="component"><ExclusiveMaximum:Object></span> <span class="component"><ExclusiveMinimum:Object></span> <span class="component">[{@link ExternalDocumentationObject}]</span> <span class="component"><Format:String></span> <span class="component">[{@link ItemsSchema}]</span> <span class="component"><Maximum:Object></span> <span class="component"><Minimum:Object></span> <span class="component"><MaxItems:Object></span> <span class="component"><MinItems:Object></span> <span class="component"><MaxLength:Object></span> <span class="component"><MinLength:Object></span> <span class="component"><MaxProperties:Object></span> <span class="component"><MinProperties:Object></span> <span class="component"><MultipleOf:Object></span> <span class="component">[{@link NotSchema}]</span> <span class="component"><Nullable:Object></span> <span class="component"><Pattern:String></span> <span class="component">{@link PropertyItem}*</span> <span class="component">{@link RequiredField}*</span> <span class="component">{@link AllOfSchema}*</span> <span class="component">{@link AnyOfSchema}*</span> <span class="component">{@link OneOfSchema}*</span> <span class="component"><ReadOnly:Object></span> <span class="component"><WriteOnly:Object></span> <span class="component"><Type:String></span> <span class="component"><Title:String></span> <span class="component"><UniqueItems:Object></span> <span class="component">[{@link XmlObject}]</span> <span class="component"><Ref:String></span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:91 + * @astdecl SchemaObject : ASTNode ::= <AdditionalProperties:SchemaObject> <AdditionalPropertiesAllowed:Boolean> <DefaultValue:Object> <Description:String> <DeprecatedBoolean:Boolean> [DiscriminatorObject] EnumObj* <Example:Object> <ExclusiveMaximum:Boolean> <ExclusiveMinimum:Boolean> [ExternalDocObject] <Format:String> [ItemsSchema] <Maximum:Number> <Minimum:Number> <MaxItems:Integer> <MinItems:Integer> <MaxLength:Integer> <MinLength:Integer> <MaxProperties:Integer> <MinProperties:Integer> <MultipleOf:Number> [NotSchema] <Nullable:Boolean> <Pattern:String> PropertyItem* RequiredField* AllOfSchema* AnyOfSchema* OneOfSchema* <ReadOnly:Boolean> <WriteOnly:Boolean> <Type:String> <Title:String> <UniqueItems:Boolean> [XmlObject] <Ref:String>; + * @production SchemaObject : {@link ASTNode} ::= <span class="component"><AdditionalProperties:SchemaObject></span> <span class="component"><AdditionalPropertiesAllowed:Boolean></span> <span class="component"><DefaultValue:Object></span> <span class="component"><Description:String></span> <span class="component"><DeprecatedBoolean:Boolean></span> <span class="component">[{@link DiscriminatorObject}]</span> <span class="component">{@link EnumObj}*</span> <span class="component"><Example:Object></span> <span class="component"><ExclusiveMaximum:Boolean></span> <span class="component"><ExclusiveMinimum:Boolean></span> <span class="component">[{@link ExternalDocObject}]</span> <span class="component"><Format:String></span> <span class="component">[{@link ItemsSchema}]</span> <span class="component"><Maximum:Number></span> <span class="component"><Minimum:Number></span> <span class="component"><MaxItems:Integer></span> <span class="component"><MinItems:Integer></span> <span class="component"><MaxLength:Integer></span> <span class="component"><MinLength:Integer></span> <span class="component"><MaxProperties:Integer></span> <span class="component"><MinProperties:Integer></span> <span class="component"><MultipleOf:Number></span> <span class="component">[{@link NotSchema}]</span> <span class="component"><Nullable:Boolean></span> <span class="component"><Pattern:String></span> <span class="component">{@link PropertyItem}*</span> <span class="component">{@link RequiredField}*</span> <span class="component">{@link AllOfSchema}*</span> <span class="component">{@link AnyOfSchema}*</span> <span class="component">{@link OneOfSchema}*</span> <span class="component"><ReadOnly:Boolean></span> <span class="component"><WriteOnly:Boolean></span> <span class="component"><Type:String></span> <span class="component"><Title:String></span> <span class="component"><UniqueItems:Boolean></span> <span class="component">[{@link XmlObject}]</span> <span class="component"><Ref:String></span>; */ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:564 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:591 */ public static org.openapi4j.parser.model.v3.Schema composeSchema (SchemaObject schemaObject) { org.openapi4j.parser.model.v3.Schema schema = new org.openapi4j.parser.model.v3.Schema(); - if( schemaObject.hasAdditionalProperties() ) - schema.setAdditionalProperties(composeSchema(schemaObject.getAdditionalProperties().getSchemaObject())); - if( schemaObject.getAdditionalPropertiesAllowed() != null ) - schema.setAdditionalPropertiesAllowed((boolean)schemaObject.getAdditionalPropertiesAllowed()); + if( !schemaObject.getRef().isEmpty() ) + schema.setRef(schemaObject.getRef()); + if( schemaObject.getAdditionalProperties() != null ) + schema.setAdditionalProperties(composeSchema(schemaObject.getAdditionalProperties())); + //if( schemaObject.getAdditionalPropertiesAllowed() != null ) + //schema.setAdditionalPropertiesAllowed(schemaObject.getAdditionalPropertiesAllowed()); if( schemaObject.getDefaultValue() != null ) schema.setDefault(schemaObject.getDefaultValue()); if( !schemaObject.getDescription().isEmpty() ) schema.setDescription(schemaObject.getDescription()); if( schemaObject.getDeprecatedBoolean() != null ) - schema.setDeprecated((boolean)schemaObject.getDeprecatedBoolean()); + schema.setDeprecated(schemaObject.getDeprecatedBoolean()); if( schemaObject.hasDiscriminatorObject() ) schema.setDiscriminator(DiscriminatorObject.composeDiscriminator(schemaObject.getDiscriminatorObject())); + if( schemaObject.getNumEnumObj() != 0 ){ + for( EnumObj e : schemaObject.getEnumObjs() ) + schema.addEnum(e.getEnumOb()); + } if( schemaObject.getExample() != null ) schema.setExample(schemaObject.getExample()); if( schemaObject.getExclusiveMaximum() != null ) - schema.setExclusiveMaximum((boolean)schemaObject.getExclusiveMaximum()); + schema.setExclusiveMaximum(schemaObject.getExclusiveMaximum()); if( schemaObject.getExclusiveMinimum() != null ) - schema.setExclusiveMinimum((boolean)schemaObject.getExclusiveMinimum()); - if( schemaObject.hasExternalDocumentationObject() ) - schema.setExternalDocs(ExternalDocumentationObject.composeExternalDocs(schemaObject.getExternalDocumentationObject())); + schema.setExclusiveMinimum(schemaObject.getExclusiveMinimum()); + if( schemaObject.hasExternalDocObject() ) + schema.setExternalDocs(ExternalDocObject.composeExternalDocs(schemaObject.getExternalDocObject())); if( !schemaObject.getFormat().isEmpty() ) schema.setFormat(schemaObject.getFormat()); if( schemaObject.hasItemsSchema() ) schema.setItemsSchema(composeSchema(schemaObject.getItemsSchema().getSchemaObject())); if( schemaObject.getMaximum() != null ) - schema.setMaximum((Number) schemaObject.getMaximum()); + schema.setMaximum(schemaObject.getMaximum()); if( schemaObject.getMinimum() != null ) - schema.setMinimum((Number) schemaObject.getMinimum()); + schema.setMinimum(schemaObject.getMinimum()); if( schemaObject.getMaxItems() != null ) - schema.setMaxItems((Integer) schemaObject.getMaxItems()); + schema.setMaxItems(schemaObject.getMaxItems()); if( schemaObject.getMinItems() != null ) - schema.setMinItems((Integer) schemaObject.getMinItems()); + schema.setMinItems(schemaObject.getMinItems()); if( schemaObject.getMaxLength() != null ) - schema.setMaxLength((Integer) schemaObject.getMaxLength()); + schema.setMaxLength(schemaObject.getMaxLength()); if( schemaObject.getMinLength() != null ) - schema.setMinLength((Integer) schemaObject.getMinLength()); + schema.setMinLength(schemaObject.getMinLength()); if( schemaObject.getMaxProperties() != null ) - schema.setMaxProperties((Integer) schemaObject.getMaxProperties()); + schema.setMaxProperties(schemaObject.getMaxProperties()); if( schemaObject.getMinProperties() != null ) - schema.setMinProperties((Integer) schemaObject.getMinProperties()); + schema.setMinProperties(schemaObject.getMinProperties()); if( schemaObject.getMultipleOf() != null ) - schema.setMultipleOf((Number) schemaObject.getMultipleOf()); + schema.setMultipleOf(schemaObject.getMultipleOf()); if( schemaObject.hasNotSchema() ) schema.setNotSchema(composeSchema(schemaObject.getNotSchema().getSchemaObject())); if( schemaObject.getNullable() != null ) - schema.setNullable((boolean) schemaObject.getNullable()); + schema.setNullable(schemaObject.getNullable()); if( !schemaObject.getPattern().isEmpty() ) schema.setPattern(schemaObject.getPattern()); if( schemaObject.getNumPropertyItem() != 0 ){ @@ -93,15 +100,15 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { schema.addOneOfSchema(composeSchema(o.getSchemaObject())); } if( schemaObject.getReadOnly() != null ) - schema.setReadOnly((boolean) schemaObject.getReadOnly()); + schema.setReadOnly(schemaObject.getReadOnly()); if( schemaObject.getWriteOnly() != null ) - schema.setWriteOnly((boolean) schemaObject.getWriteOnly()); + schema.setWriteOnly(schemaObject.getWriteOnly()); if( !schemaObject.getType().isEmpty() ) schema.setType(schemaObject.getType()); if( !schemaObject.getTitle().isEmpty() ) schema.setTitle(schemaObject.getTitle()); if( schemaObject.getUniqueItems() != null ) - schema.setUniqueItems((boolean) schemaObject.getUniqueItems()); + schema.setUniqueItems(schemaObject.getUniqueItems()); if( schemaObject.hasXmlObject() ) schema.setXml(XmlObject.composeXml(schemaObject.getXmlObject())); @@ -109,18 +116,18 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:618 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:600 */ public static SchemaObject parseSchema (org.openapi4j.parser.model.v3.Schema schema) { SchemaObject schemaObject = new SchemaObject(); - if( schema.getAdditionalProperties() != null ){ - AdditionalProperties additionalProperties = new AdditionalProperties(); - additionalProperties.setSchemaObject(parseSchema(schema.getAdditionalProperties())); - schemaObject.setAdditionalProperties(additionalProperties); - } + if( schema.isRef() ) + schemaObject.setRef(schema.getRef()); + if( schema.getAdditionalProperties() != null ) + schemaObject.setAdditionalProperties(parseSchema(schema.getAdditionalProperties())); if( schema.getAdditionalPropertiesAllowed() != null ) schemaObject.setAdditionalPropertiesAllowed(schema.getAdditionalPropertiesAllowed()); + System.out.println(schema.getAdditionalPropertiesAllowed()); if( schema.getDefault() != null ) schemaObject.setDefaultValue(schema.getDefault()); if( schema.getDescription() != null ) @@ -130,8 +137,8 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { if( schema.getDiscriminator() != null ) schemaObject.setDiscriminatorObject(DiscriminatorObject.parseDiscriminator(schema.getDiscriminator())); if( schema.getEnums() != null ){ - EnumObj enumObj = new EnumObj(); for( Object o : schema.getEnums() ){ + EnumObj enumObj = new EnumObj(); enumObj.setEnumOb(o); schemaObject.addEnumObj(enumObj); } @@ -143,7 +150,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { if( schema.getExclusiveMinimum() != null ) schemaObject.setExclusiveMinimum(schema.getExclusiveMinimum()); if( schema.getExternalDocs() != null ) - schemaObject.setExternalDocumentationObject(ExternalDocumentationObject.parseExternalDocs(schema.getExternalDocs())); + schemaObject.setExternalDocObject(ExternalDocObject.parseExternalDocs(schema.getExternalDocs())); if( schema.getFormat() != null ) schemaObject.setFormat(schema.getFormat()); if( schema.getItemsSchema() != null ){ @@ -179,34 +186,35 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { if( schema.getPattern() != null ) schemaObject.setPattern(schema.getPattern()); if( schema.getProperties() != null ){ + for( String key : schema.getProperties().keySet() ){ PropertyItem propertyItem = new PropertyItem(); - for( String key : schema.getProperties().keySet() ) schemaObject.addPropertyItem(new PropertyItem(key, parseSchema(schema.getProperty(key)))); } + } if( schema.getRequiredFields() != null ){ - RequiredField requiredField = new RequiredField(); for( String s : schema.getRequiredFields() ){ + RequiredField requiredField = new RequiredField(); requiredField.setValue(s); schemaObject.addRequiredField(requiredField); } } if( schema.getAllOfSchemas() != null ){ - AllOfSchema allOfSchema = new AllOfSchema(); for(org.openapi4j.parser.model.v3.Schema schemaItem : schema.getAllOfSchemas()){ + AllOfSchema allOfSchema = new AllOfSchema(); allOfSchema.setSchemaObject(parseSchema(schemaItem)); schemaObject.addAllOfSchema(allOfSchema); } } if( schema.getAnyOfSchemas() != null ){ - AnyOfSchema anyOfSchema = new AnyOfSchema(); for(org.openapi4j.parser.model.v3.Schema schemaItem : schema.getAnyOfSchemas()){ + AnyOfSchema anyOfSchema = new AnyOfSchema(); anyOfSchema.setSchemaObject(parseSchema(schemaItem)); schemaObject.addAnyOfSchema(anyOfSchema); } } if( schema.getOneOfSchemas() != null ){ - OneOfSchema oneOfSchema = new OneOfSchema(); for(org.openapi4j.parser.model.v3.Schema schemaItem : schema.getOneOfSchemas()){ + OneOfSchema oneOfSchema = new OneOfSchema(); oneOfSchema.setSchemaObject(parseSchema(schemaItem)); schemaObject.addOneOfSchema(oneOfSchema); } @@ -240,42 +248,41 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[12]; + children = new ASTNode[11]; setChild(new Opt(), 0); - setChild(new Opt(), 1); - setChild(new JastAddList(), 2); + setChild(new JastAddList(), 1); + setChild(new Opt(), 2); setChild(new Opt(), 3); setChild(new Opt(), 4); - setChild(new Opt(), 5); + setChild(new JastAddList(), 5); setChild(new JastAddList(), 6); setChild(new JastAddList(), 7); setChild(new JastAddList(), 8); setChild(new JastAddList(), 9); - setChild(new JastAddList(), 10); - setChild(new Opt(), 11); + setChild(new Opt(), 10); } /** - * @declaredat ASTNode:25 + * @declaredat ASTNode:24 */ @ASTNodeAnnotation.Constructor( - name = {"AdditionalProperties", "AdditionalPropertiesAllowed", "DefaultValue", "Description", "DeprecatedBoolean", "DiscriminatorObject", "EnumObj", "Example", "ExclusiveMaximum", "ExclusiveMinimum", "ExternalDocumentationObject", "Format", "ItemsSchema", "Maximum", "Minimum", "MaxItems", "MinItems", "MaxLength", "MinLength", "MaxProperties", "MinProperties", "MultipleOf", "NotSchema", "Nullable", "Pattern", "PropertyItem", "RequiredField", "AllOfSchema", "AnyOfSchema", "OneOfSchema", "ReadOnly", "WriteOnly", "Type", "Title", "UniqueItems", "XmlObject", "Ref"}, - type = {"Opt<AdditionalProperties>", "Object", "Object", "String", "Object", "Opt<DiscriminatorObject>", "JastAddList<EnumObj>", "Object", "Object", "Object", "Opt<ExternalDocumentationObject>", "String", "Opt<ItemsSchema>", "Object", "Object", "Object", "Object", "Object", "Object", "Object", "Object", "Object", "Opt<NotSchema>", "Object", "String", "JastAddList<PropertyItem>", "JastAddList<RequiredField>", "JastAddList<AllOfSchema>", "JastAddList<AnyOfSchema>", "JastAddList<OneOfSchema>", "Object", "Object", "String", "String", "Object", "Opt<XmlObject>", "String"}, - kind = {"Opt", "Token", "Token", "Token", "Token", "Opt", "List", "Token", "Token", "Token", "Opt", "Token", "Opt", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "Token", "List", "List", "List", "List", "List", "Token", "Token", "Token", "Token", "Token", "Opt", "Token"} + name = {"AdditionalProperties", "AdditionalPropertiesAllowed", "DefaultValue", "Description", "DeprecatedBoolean", "DiscriminatorObject", "EnumObj", "Example", "ExclusiveMaximum", "ExclusiveMinimum", "ExternalDocObject", "Format", "ItemsSchema", "Maximum", "Minimum", "MaxItems", "MinItems", "MaxLength", "MinLength", "MaxProperties", "MinProperties", "MultipleOf", "NotSchema", "Nullable", "Pattern", "PropertyItem", "RequiredField", "AllOfSchema", "AnyOfSchema", "OneOfSchema", "ReadOnly", "WriteOnly", "Type", "Title", "UniqueItems", "XmlObject", "Ref"}, + type = {"SchemaObject", "Boolean", "Object", "String", "Boolean", "Opt<DiscriminatorObject>", "JastAddList<EnumObj>", "Object", "Boolean", "Boolean", "Opt<ExternalDocObject>", "String", "Opt<ItemsSchema>", "Number", "Number", "Integer", "Integer", "Integer", "Integer", "Integer", "Integer", "Number", "Opt<NotSchema>", "Boolean", "String", "JastAddList<PropertyItem>", "JastAddList<RequiredField>", "JastAddList<AllOfSchema>", "JastAddList<AnyOfSchema>", "JastAddList<OneOfSchema>", "Boolean", "Boolean", "String", "String", "Boolean", "Opt<XmlObject>", "String"}, + kind = {"Token", "Token", "Token", "Token", "Token", "Opt", "List", "Token", "Token", "Token", "Opt", "Token", "Opt", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "Token", "List", "List", "List", "List", "List", "Token", "Token", "Token", "Token", "Token", "Opt", "Token"} ) - public SchemaObject(Opt<AdditionalProperties> p0, Object p1, Object p2, String p3, Object p4, Opt<DiscriminatorObject> p5, JastAddList<EnumObj> p6, Object p7, Object p8, Object p9, Opt<ExternalDocumentationObject> p10, String p11, Opt<ItemsSchema> p12, Object p13, Object p14, Object p15, Object p16, Object p17, Object p18, Object p19, Object p20, Object p21, Opt<NotSchema> p22, Object p23, String p24, JastAddList<PropertyItem> p25, JastAddList<RequiredField> p26, JastAddList<AllOfSchema> p27, JastAddList<AnyOfSchema> p28, JastAddList<OneOfSchema> p29, Object p30, Object p31, String p32, String p33, Object p34, Opt<XmlObject> p35, String p36) { - setChild(p0, 0); + public SchemaObject(SchemaObject p0, Boolean p1, Object p2, String p3, Boolean p4, Opt<DiscriminatorObject> p5, JastAddList<EnumObj> p6, Object p7, Boolean p8, Boolean p9, Opt<ExternalDocObject> p10, String p11, Opt<ItemsSchema> p12, Number p13, Number p14, Integer p15, Integer p16, Integer p17, Integer p18, Integer p19, Integer p20, Number p21, Opt<NotSchema> p22, Boolean p23, String p24, JastAddList<PropertyItem> p25, JastAddList<RequiredField> p26, JastAddList<AllOfSchema> p27, JastAddList<AnyOfSchema> p28, JastAddList<OneOfSchema> p29, Boolean p30, Boolean p31, String p32, String p33, Boolean p34, Opt<XmlObject> p35, String p36) { + setAdditionalProperties(p0); setAdditionalPropertiesAllowed(p1); setDefaultValue(p2); setDescription(p3); setDeprecatedBoolean(p4); - setChild(p5, 1); - setChild(p6, 2); + setChild(p5, 0); + setChild(p6, 1); setExample(p7); setExclusiveMaximum(p8); setExclusiveMinimum(p9); - setChild(p10, 3); + setChild(p10, 2); setFormat(p11); - setChild(p12, 4); + setChild(p12, 3); setMaximum(p13); setMinimum(p14); setMaxItems(p15); @@ -285,56 +292,56 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { setMaxProperties(p19); setMinProperties(p20); setMultipleOf(p21); - setChild(p22, 5); + setChild(p22, 4); setNullable(p23); setPattern(p24); - setChild(p25, 6); - setChild(p26, 7); - setChild(p27, 8); - setChild(p28, 9); - setChild(p29, 10); + setChild(p25, 5); + setChild(p26, 6); + setChild(p27, 7); + setChild(p28, 8); + setChild(p29, 9); setReadOnly(p30); setWriteOnly(p31); setType(p32); setTitle(p33); setUniqueItems(p34); - setChild(p35, 11); + setChild(p35, 10); setRef(p36); } /** @apilevel low-level - * @declaredat ASTNode:70 + * @declaredat ASTNode:69 */ protected int numChildren() { - return 12; + return 11; } /** * @apilevel internal - * @declaredat ASTNode:76 + * @declaredat ASTNode:75 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:80 + * @declaredat ASTNode:79 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:84 + * @declaredat ASTNode:83 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:88 + * @declaredat ASTNode:87 */ public SchemaObject clone() throws CloneNotSupportedException { SchemaObject node = (SchemaObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:93 + * @declaredat ASTNode:92 */ public SchemaObject copy() { try { @@ -354,7 +361,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:112 + * @declaredat ASTNode:111 */ @Deprecated public SchemaObject fullCopy() { @@ -365,7 +372,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:122 + * @declaredat ASTNode:121 */ public SchemaObject treeCopyNoTransform() { SchemaObject tree = (SchemaObject) copy(); @@ -386,7 +393,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:142 + * @declaredat ASTNode:141 */ public SchemaObject treeCopy() { SchemaObject tree = (SchemaObject) copy(); @@ -402,81 +409,50 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:156 + * @declaredat ASTNode:155 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenObject_AdditionalPropertiesAllowed == ((SchemaObject) node).tokenObject_AdditionalPropertiesAllowed) && (tokenObject_DefaultValue == ((SchemaObject) node).tokenObject_DefaultValue) && (tokenString_Description == ((SchemaObject) node).tokenString_Description) && (tokenObject_DeprecatedBoolean == ((SchemaObject) node).tokenObject_DeprecatedBoolean) && (tokenObject_Example == ((SchemaObject) node).tokenObject_Example) && (tokenObject_ExclusiveMaximum == ((SchemaObject) node).tokenObject_ExclusiveMaximum) && (tokenObject_ExclusiveMinimum == ((SchemaObject) node).tokenObject_ExclusiveMinimum) && (tokenString_Format == ((SchemaObject) node).tokenString_Format) && (tokenObject_Maximum == ((SchemaObject) node).tokenObject_Maximum) && (tokenObject_Minimum == ((SchemaObject) node).tokenObject_Minimum) && (tokenObject_MaxItems == ((SchemaObject) node).tokenObject_MaxItems) && (tokenObject_MinItems == ((SchemaObject) node).tokenObject_MinItems) && (tokenObject_MaxLength == ((SchemaObject) node).tokenObject_MaxLength) && (tokenObject_MinLength == ((SchemaObject) node).tokenObject_MinLength) && (tokenObject_MaxProperties == ((SchemaObject) node).tokenObject_MaxProperties) && (tokenObject_MinProperties == ((SchemaObject) node).tokenObject_MinProperties) && (tokenObject_MultipleOf == ((SchemaObject) node).tokenObject_MultipleOf) && (tokenObject_Nullable == ((SchemaObject) node).tokenObject_Nullable) && (tokenString_Pattern == ((SchemaObject) node).tokenString_Pattern) && (tokenObject_ReadOnly == ((SchemaObject) node).tokenObject_ReadOnly) && (tokenObject_WriteOnly == ((SchemaObject) node).tokenObject_WriteOnly) && (tokenString_Type == ((SchemaObject) node).tokenString_Type) && (tokenString_Title == ((SchemaObject) node).tokenString_Title) && (tokenObject_UniqueItems == ((SchemaObject) node).tokenObject_UniqueItems) && (tokenString_Ref == ((SchemaObject) node).tokenString_Ref); - } - /** - * Replaces the optional node for the AdditionalProperties child. This is the <code>Opt</code> - * node containing the child AdditionalProperties, not the actual child! - * @param opt The new node to be used as the optional node for the AdditionalProperties child. - * @apilevel low-level - */ - public void setAdditionalPropertiesOpt(Opt<AdditionalProperties> opt) { - setChild(opt, 0); + return super.is$Equal(node) && (tokenSchemaObject_AdditionalProperties == ((SchemaObject) node).tokenSchemaObject_AdditionalProperties) && (tokenBoolean_AdditionalPropertiesAllowed == ((SchemaObject) node).tokenBoolean_AdditionalPropertiesAllowed) && (tokenObject_DefaultValue == ((SchemaObject) node).tokenObject_DefaultValue) && (tokenString_Description == ((SchemaObject) node).tokenString_Description) && (tokenBoolean_DeprecatedBoolean == ((SchemaObject) node).tokenBoolean_DeprecatedBoolean) && (tokenObject_Example == ((SchemaObject) node).tokenObject_Example) && (tokenBoolean_ExclusiveMaximum == ((SchemaObject) node).tokenBoolean_ExclusiveMaximum) && (tokenBoolean_ExclusiveMinimum == ((SchemaObject) node).tokenBoolean_ExclusiveMinimum) && (tokenString_Format == ((SchemaObject) node).tokenString_Format) && (tokenNumber_Maximum == ((SchemaObject) node).tokenNumber_Maximum) && (tokenNumber_Minimum == ((SchemaObject) node).tokenNumber_Minimum) && (tokenInteger_MaxItems == ((SchemaObject) node).tokenInteger_MaxItems) && (tokenInteger_MinItems == ((SchemaObject) node).tokenInteger_MinItems) && (tokenInteger_MaxLength == ((SchemaObject) node).tokenInteger_MaxLength) && (tokenInteger_MinLength == ((SchemaObject) node).tokenInteger_MinLength) && (tokenInteger_MaxProperties == ((SchemaObject) node).tokenInteger_MaxProperties) && (tokenInteger_MinProperties == ((SchemaObject) node).tokenInteger_MinProperties) && (tokenNumber_MultipleOf == ((SchemaObject) node).tokenNumber_MultipleOf) && (tokenBoolean_Nullable == ((SchemaObject) node).tokenBoolean_Nullable) && (tokenString_Pattern == ((SchemaObject) node).tokenString_Pattern) && (tokenBoolean_ReadOnly == ((SchemaObject) node).tokenBoolean_ReadOnly) && (tokenBoolean_WriteOnly == ((SchemaObject) node).tokenBoolean_WriteOnly) && (tokenString_Type == ((SchemaObject) node).tokenString_Type) && (tokenString_Title == ((SchemaObject) node).tokenString_Title) && (tokenBoolean_UniqueItems == ((SchemaObject) node).tokenBoolean_UniqueItems) && (tokenString_Ref == ((SchemaObject) node).tokenString_Ref); } /** - * Replaces the (optional) AdditionalProperties child. - * @param node The new node to be used as the AdditionalProperties child. + * Replaces the lexeme AdditionalProperties. + * @param value The new value for the lexeme AdditionalProperties. * @apilevel high-level */ - public void setAdditionalProperties(AdditionalProperties node) { - getAdditionalPropertiesOpt().setChild(node, 0); - } - /** - * Check whether the optional AdditionalProperties child exists. - * @return {@code true} if the optional AdditionalProperties child exists, {@code false} if it does not. - * @apilevel high-level - */ - public boolean hasAdditionalProperties() { - return getAdditionalPropertiesOpt().getNumChild() != 0; - } - /** - * Retrieves the (optional) AdditionalProperties child. - * @return The AdditionalProperties child, if it exists. Returns {@code null} otherwise. - * @apilevel low-level - */ - public AdditionalProperties getAdditionalProperties() { - return (AdditionalProperties) getAdditionalPropertiesOpt().getChild(0); + public void setAdditionalProperties(SchemaObject value) { + tokenSchemaObject_AdditionalProperties = value; } - /** - * Retrieves the optional node for the AdditionalProperties child. This is the <code>Opt</code> node containing the child AdditionalProperties, not the actual child! - * @return The optional node for child the AdditionalProperties child. - * @apilevel low-level + /** @apilevel internal */ - @ASTNodeAnnotation.OptChild(name="AdditionalProperties") - public Opt<AdditionalProperties> getAdditionalPropertiesOpt() { - return (Opt<AdditionalProperties>) getChild(0); - } + protected SchemaObject tokenSchemaObject_AdditionalProperties; /** - * Retrieves the optional node for child AdditionalProperties. This is the <code>Opt</code> node containing the child AdditionalProperties, not the actual child! - * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child AdditionalProperties. - * @apilevel low-level + * Retrieves the value for the lexeme AdditionalProperties. + * @return The value for the lexeme AdditionalProperties. + * @apilevel high-level */ - public Opt<AdditionalProperties> getAdditionalPropertiesOptNoTransform() { - return (Opt<AdditionalProperties>) getChildNoTransform(0); + @ASTNodeAnnotation.Token(name="AdditionalProperties") + public SchemaObject getAdditionalProperties() { + return tokenSchemaObject_AdditionalProperties; } /** * Replaces the lexeme AdditionalPropertiesAllowed. * @param value The new value for the lexeme AdditionalPropertiesAllowed. * @apilevel high-level */ - public void setAdditionalPropertiesAllowed(Object value) { - tokenObject_AdditionalPropertiesAllowed = value; + public void setAdditionalPropertiesAllowed(Boolean value) { + tokenBoolean_AdditionalPropertiesAllowed = value; } /** @apilevel internal */ - protected Object tokenObject_AdditionalPropertiesAllowed; + protected Boolean tokenBoolean_AdditionalPropertiesAllowed; /** * Retrieves the value for the lexeme AdditionalPropertiesAllowed. * @return The value for the lexeme AdditionalPropertiesAllowed. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="AdditionalPropertiesAllowed") - public Object getAdditionalPropertiesAllowed() { - return tokenObject_AdditionalPropertiesAllowed; + public Boolean getAdditionalPropertiesAllowed() { + return tokenBoolean_AdditionalPropertiesAllowed; } /** * Replaces the lexeme DefaultValue. @@ -523,20 +499,20 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @param value The new value for the lexeme DeprecatedBoolean. * @apilevel high-level */ - public void setDeprecatedBoolean(Object value) { - tokenObject_DeprecatedBoolean = value; + public void setDeprecatedBoolean(Boolean value) { + tokenBoolean_DeprecatedBoolean = value; } /** @apilevel internal */ - protected Object tokenObject_DeprecatedBoolean; + protected Boolean tokenBoolean_DeprecatedBoolean; /** * Retrieves the value for the lexeme DeprecatedBoolean. * @return The value for the lexeme DeprecatedBoolean. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="DeprecatedBoolean") - public Object getDeprecatedBoolean() { - return tokenObject_DeprecatedBoolean; + public Boolean getDeprecatedBoolean() { + return tokenBoolean_DeprecatedBoolean; } /** * Replaces the optional node for the DiscriminatorObject child. This is the <code>Opt</code> @@ -545,7 +521,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public void setDiscriminatorObjectOpt(Opt<DiscriminatorObject> opt) { - setChild(opt, 1); + setChild(opt, 0); } /** * Replaces the (optional) DiscriminatorObject child. @@ -578,7 +554,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.OptChild(name="DiscriminatorObject") public Opt<DiscriminatorObject> getDiscriminatorObjectOpt() { - return (Opt<DiscriminatorObject>) getChild(1); + return (Opt<DiscriminatorObject>) getChild(0); } /** * Retrieves the optional node for child DiscriminatorObject. This is the <code>Opt</code> node containing the child DiscriminatorObject, not the actual child! @@ -587,7 +563,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public Opt<DiscriminatorObject> getDiscriminatorObjectOptNoTransform() { - return (Opt<DiscriminatorObject>) getChildNoTransform(1); + return (Opt<DiscriminatorObject>) getChildNoTransform(0); } /** * Replaces the EnumObj list. @@ -595,7 +571,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel high-level */ public void setEnumObjList(JastAddList<EnumObj> list) { - setChild(list, 2); + setChild(list, 1); } /** * Retrieves the number of children in the EnumObj list. @@ -663,7 +639,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.ListChild(name="EnumObj") public JastAddList<EnumObj> getEnumObjList() { - JastAddList<EnumObj> list = (JastAddList<EnumObj>) getChild(2); + JastAddList<EnumObj> list = (JastAddList<EnumObj>) getChild(1); return list; } /** @@ -673,7 +649,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public JastAddList<EnumObj> getEnumObjListNoTransform() { - return (JastAddList<EnumObj>) getChildNoTransform(2); + return (JastAddList<EnumObj>) getChildNoTransform(1); } /** * @return the element at index {@code i} in the EnumObj list without @@ -724,91 +700,91 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @param value The new value for the lexeme ExclusiveMaximum. * @apilevel high-level */ - public void setExclusiveMaximum(Object value) { - tokenObject_ExclusiveMaximum = value; + public void setExclusiveMaximum(Boolean value) { + tokenBoolean_ExclusiveMaximum = value; } /** @apilevel internal */ - protected Object tokenObject_ExclusiveMaximum; + protected Boolean tokenBoolean_ExclusiveMaximum; /** * Retrieves the value for the lexeme ExclusiveMaximum. * @return The value for the lexeme ExclusiveMaximum. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="ExclusiveMaximum") - public Object getExclusiveMaximum() { - return tokenObject_ExclusiveMaximum; + public Boolean getExclusiveMaximum() { + return tokenBoolean_ExclusiveMaximum; } /** * Replaces the lexeme ExclusiveMinimum. * @param value The new value for the lexeme ExclusiveMinimum. * @apilevel high-level */ - public void setExclusiveMinimum(Object value) { - tokenObject_ExclusiveMinimum = value; + public void setExclusiveMinimum(Boolean value) { + tokenBoolean_ExclusiveMinimum = value; } /** @apilevel internal */ - protected Object tokenObject_ExclusiveMinimum; + protected Boolean tokenBoolean_ExclusiveMinimum; /** * Retrieves the value for the lexeme ExclusiveMinimum. * @return The value for the lexeme ExclusiveMinimum. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="ExclusiveMinimum") - public Object getExclusiveMinimum() { - return tokenObject_ExclusiveMinimum; + public Boolean getExclusiveMinimum() { + return tokenBoolean_ExclusiveMinimum; } /** - * Replaces the optional node for the ExternalDocumentationObject child. This is the <code>Opt</code> - * node containing the child ExternalDocumentationObject, not the actual child! - * @param opt The new node to be used as the optional node for the ExternalDocumentationObject child. + * Replaces the optional node for the ExternalDocObject child. This is the <code>Opt</code> + * node containing the child ExternalDocObject, not the actual child! + * @param opt The new node to be used as the optional node for the ExternalDocObject child. * @apilevel low-level */ - public void setExternalDocumentationObjectOpt(Opt<ExternalDocumentationObject> opt) { - setChild(opt, 3); + public void setExternalDocObjectOpt(Opt<ExternalDocObject> opt) { + setChild(opt, 2); } /** - * Replaces the (optional) ExternalDocumentationObject child. - * @param node The new node to be used as the ExternalDocumentationObject child. + * Replaces the (optional) ExternalDocObject child. + * @param node The new node to be used as the ExternalDocObject child. * @apilevel high-level */ - public void setExternalDocumentationObject(ExternalDocumentationObject node) { - getExternalDocumentationObjectOpt().setChild(node, 0); + public void setExternalDocObject(ExternalDocObject node) { + getExternalDocObjectOpt().setChild(node, 0); } /** - * Check whether the optional ExternalDocumentationObject child exists. - * @return {@code true} if the optional ExternalDocumentationObject child exists, {@code false} if it does not. + * Check whether the optional ExternalDocObject child exists. + * @return {@code true} if the optional ExternalDocObject child exists, {@code false} if it does not. * @apilevel high-level */ - public boolean hasExternalDocumentationObject() { - return getExternalDocumentationObjectOpt().getNumChild() != 0; + public boolean hasExternalDocObject() { + return getExternalDocObjectOpt().getNumChild() != 0; } /** - * Retrieves the (optional) ExternalDocumentationObject child. - * @return The ExternalDocumentationObject child, if it exists. Returns {@code null} otherwise. + * Retrieves the (optional) ExternalDocObject child. + * @return The ExternalDocObject child, if it exists. Returns {@code null} otherwise. * @apilevel low-level */ - public ExternalDocumentationObject getExternalDocumentationObject() { - return (ExternalDocumentationObject) getExternalDocumentationObjectOpt().getChild(0); + public ExternalDocObject getExternalDocObject() { + return (ExternalDocObject) getExternalDocObjectOpt().getChild(0); } /** - * Retrieves the optional node for the ExternalDocumentationObject child. This is the <code>Opt</code> node containing the child ExternalDocumentationObject, not the actual child! - * @return The optional node for child the ExternalDocumentationObject child. + * Retrieves the optional node for the ExternalDocObject child. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! + * @return The optional node for child the ExternalDocObject child. * @apilevel low-level */ - @ASTNodeAnnotation.OptChild(name="ExternalDocumentationObject") - public Opt<ExternalDocumentationObject> getExternalDocumentationObjectOpt() { - return (Opt<ExternalDocumentationObject>) getChild(3); + @ASTNodeAnnotation.OptChild(name="ExternalDocObject") + public Opt<ExternalDocObject> getExternalDocObjectOpt() { + return (Opt<ExternalDocObject>) getChild(2); } /** - * Retrieves the optional node for child ExternalDocumentationObject. This is the <code>Opt</code> node containing the child ExternalDocumentationObject, not the actual child! + * Retrieves the optional node for child ExternalDocObject. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ExternalDocumentationObject. + * @return The optional node for child ExternalDocObject. * @apilevel low-level */ - public Opt<ExternalDocumentationObject> getExternalDocumentationObjectOptNoTransform() { - return (Opt<ExternalDocumentationObject>) getChildNoTransform(3); + public Opt<ExternalDocObject> getExternalDocObjectOptNoTransform() { + return (Opt<ExternalDocObject>) getChildNoTransform(2); } /** * Replaces the lexeme Format. @@ -837,7 +813,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public void setItemsSchemaOpt(Opt<ItemsSchema> opt) { - setChild(opt, 4); + setChild(opt, 3); } /** * Replaces the (optional) ItemsSchema child. @@ -870,7 +846,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.OptChild(name="ItemsSchema") public Opt<ItemsSchema> getItemsSchemaOpt() { - return (Opt<ItemsSchema>) getChild(4); + return (Opt<ItemsSchema>) getChild(3); } /** * Retrieves the optional node for child ItemsSchema. This is the <code>Opt</code> node containing the child ItemsSchema, not the actual child! @@ -879,187 +855,187 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public Opt<ItemsSchema> getItemsSchemaOptNoTransform() { - return (Opt<ItemsSchema>) getChildNoTransform(4); + return (Opt<ItemsSchema>) getChildNoTransform(3); } /** * Replaces the lexeme Maximum. * @param value The new value for the lexeme Maximum. * @apilevel high-level */ - public void setMaximum(Object value) { - tokenObject_Maximum = value; + public void setMaximum(Number value) { + tokenNumber_Maximum = value; } /** @apilevel internal */ - protected Object tokenObject_Maximum; + protected Number tokenNumber_Maximum; /** * Retrieves the value for the lexeme Maximum. * @return The value for the lexeme Maximum. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="Maximum") - public Object getMaximum() { - return tokenObject_Maximum; + public Number getMaximum() { + return tokenNumber_Maximum; } /** * Replaces the lexeme Minimum. * @param value The new value for the lexeme Minimum. * @apilevel high-level */ - public void setMinimum(Object value) { - tokenObject_Minimum = value; + public void setMinimum(Number value) { + tokenNumber_Minimum = value; } /** @apilevel internal */ - protected Object tokenObject_Minimum; + protected Number tokenNumber_Minimum; /** * Retrieves the value for the lexeme Minimum. * @return The value for the lexeme Minimum. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="Minimum") - public Object getMinimum() { - return tokenObject_Minimum; + public Number getMinimum() { + return tokenNumber_Minimum; } /** * Replaces the lexeme MaxItems. * @param value The new value for the lexeme MaxItems. * @apilevel high-level */ - public void setMaxItems(Object value) { - tokenObject_MaxItems = value; + public void setMaxItems(Integer value) { + tokenInteger_MaxItems = value; } /** @apilevel internal */ - protected Object tokenObject_MaxItems; + protected Integer tokenInteger_MaxItems; /** * Retrieves the value for the lexeme MaxItems. * @return The value for the lexeme MaxItems. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="MaxItems") - public Object getMaxItems() { - return tokenObject_MaxItems; + public Integer getMaxItems() { + return tokenInteger_MaxItems; } /** * Replaces the lexeme MinItems. * @param value The new value for the lexeme MinItems. * @apilevel high-level */ - public void setMinItems(Object value) { - tokenObject_MinItems = value; + public void setMinItems(Integer value) { + tokenInteger_MinItems = value; } /** @apilevel internal */ - protected Object tokenObject_MinItems; + protected Integer tokenInteger_MinItems; /** * Retrieves the value for the lexeme MinItems. * @return The value for the lexeme MinItems. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="MinItems") - public Object getMinItems() { - return tokenObject_MinItems; + public Integer getMinItems() { + return tokenInteger_MinItems; } /** * Replaces the lexeme MaxLength. * @param value The new value for the lexeme MaxLength. * @apilevel high-level */ - public void setMaxLength(Object value) { - tokenObject_MaxLength = value; + public void setMaxLength(Integer value) { + tokenInteger_MaxLength = value; } /** @apilevel internal */ - protected Object tokenObject_MaxLength; + protected Integer tokenInteger_MaxLength; /** * Retrieves the value for the lexeme MaxLength. * @return The value for the lexeme MaxLength. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="MaxLength") - public Object getMaxLength() { - return tokenObject_MaxLength; + public Integer getMaxLength() { + return tokenInteger_MaxLength; } /** * Replaces the lexeme MinLength. * @param value The new value for the lexeme MinLength. * @apilevel high-level */ - public void setMinLength(Object value) { - tokenObject_MinLength = value; + public void setMinLength(Integer value) { + tokenInteger_MinLength = value; } /** @apilevel internal */ - protected Object tokenObject_MinLength; + protected Integer tokenInteger_MinLength; /** * Retrieves the value for the lexeme MinLength. * @return The value for the lexeme MinLength. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="MinLength") - public Object getMinLength() { - return tokenObject_MinLength; + public Integer getMinLength() { + return tokenInteger_MinLength; } /** * Replaces the lexeme MaxProperties. * @param value The new value for the lexeme MaxProperties. * @apilevel high-level */ - public void setMaxProperties(Object value) { - tokenObject_MaxProperties = value; + public void setMaxProperties(Integer value) { + tokenInteger_MaxProperties = value; } /** @apilevel internal */ - protected Object tokenObject_MaxProperties; + protected Integer tokenInteger_MaxProperties; /** * Retrieves the value for the lexeme MaxProperties. * @return The value for the lexeme MaxProperties. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="MaxProperties") - public Object getMaxProperties() { - return tokenObject_MaxProperties; + public Integer getMaxProperties() { + return tokenInteger_MaxProperties; } /** * Replaces the lexeme MinProperties. * @param value The new value for the lexeme MinProperties. * @apilevel high-level */ - public void setMinProperties(Object value) { - tokenObject_MinProperties = value; + public void setMinProperties(Integer value) { + tokenInteger_MinProperties = value; } /** @apilevel internal */ - protected Object tokenObject_MinProperties; + protected Integer tokenInteger_MinProperties; /** * Retrieves the value for the lexeme MinProperties. * @return The value for the lexeme MinProperties. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="MinProperties") - public Object getMinProperties() { - return tokenObject_MinProperties; + public Integer getMinProperties() { + return tokenInteger_MinProperties; } /** * Replaces the lexeme MultipleOf. * @param value The new value for the lexeme MultipleOf. * @apilevel high-level */ - public void setMultipleOf(Object value) { - tokenObject_MultipleOf = value; + public void setMultipleOf(Number value) { + tokenNumber_MultipleOf = value; } /** @apilevel internal */ - protected Object tokenObject_MultipleOf; + protected Number tokenNumber_MultipleOf; /** * Retrieves the value for the lexeme MultipleOf. * @return The value for the lexeme MultipleOf. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="MultipleOf") - public Object getMultipleOf() { - return tokenObject_MultipleOf; + public Number getMultipleOf() { + return tokenNumber_MultipleOf; } /** * Replaces the optional node for the NotSchema child. This is the <code>Opt</code> @@ -1068,7 +1044,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public void setNotSchemaOpt(Opt<NotSchema> opt) { - setChild(opt, 5); + setChild(opt, 4); } /** * Replaces the (optional) NotSchema child. @@ -1101,7 +1077,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.OptChild(name="NotSchema") public Opt<NotSchema> getNotSchemaOpt() { - return (Opt<NotSchema>) getChild(5); + return (Opt<NotSchema>) getChild(4); } /** * Retrieves the optional node for child NotSchema. This is the <code>Opt</code> node containing the child NotSchema, not the actual child! @@ -1110,27 +1086,27 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public Opt<NotSchema> getNotSchemaOptNoTransform() { - return (Opt<NotSchema>) getChildNoTransform(5); + return (Opt<NotSchema>) getChildNoTransform(4); } /** * Replaces the lexeme Nullable. * @param value The new value for the lexeme Nullable. * @apilevel high-level */ - public void setNullable(Object value) { - tokenObject_Nullable = value; + public void setNullable(Boolean value) { + tokenBoolean_Nullable = value; } /** @apilevel internal */ - protected Object tokenObject_Nullable; + protected Boolean tokenBoolean_Nullable; /** * Retrieves the value for the lexeme Nullable. * @return The value for the lexeme Nullable. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="Nullable") - public Object getNullable() { - return tokenObject_Nullable; + public Boolean getNullable() { + return tokenBoolean_Nullable; } /** * Replaces the lexeme Pattern. @@ -1158,7 +1134,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel high-level */ public void setPropertyItemList(JastAddList<PropertyItem> list) { - setChild(list, 6); + setChild(list, 5); } /** * Retrieves the number of children in the PropertyItem list. @@ -1226,7 +1202,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.ListChild(name="PropertyItem") public JastAddList<PropertyItem> getPropertyItemList() { - JastAddList<PropertyItem> list = (JastAddList<PropertyItem>) getChild(6); + JastAddList<PropertyItem> list = (JastAddList<PropertyItem>) getChild(5); return list; } /** @@ -1236,7 +1212,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public JastAddList<PropertyItem> getPropertyItemListNoTransform() { - return (JastAddList<PropertyItem>) getChildNoTransform(6); + return (JastAddList<PropertyItem>) getChildNoTransform(5); } /** * @return the element at index {@code i} in the PropertyItem list without @@ -1268,7 +1244,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel high-level */ public void setRequiredFieldList(JastAddList<RequiredField> list) { - setChild(list, 7); + setChild(list, 6); } /** * Retrieves the number of children in the RequiredField list. @@ -1336,7 +1312,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.ListChild(name="RequiredField") public JastAddList<RequiredField> getRequiredFieldList() { - JastAddList<RequiredField> list = (JastAddList<RequiredField>) getChild(7); + JastAddList<RequiredField> list = (JastAddList<RequiredField>) getChild(6); return list; } /** @@ -1346,7 +1322,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public JastAddList<RequiredField> getRequiredFieldListNoTransform() { - return (JastAddList<RequiredField>) getChildNoTransform(7); + return (JastAddList<RequiredField>) getChildNoTransform(6); } /** * @return the element at index {@code i} in the RequiredField list without @@ -1378,7 +1354,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel high-level */ public void setAllOfSchemaList(JastAddList<AllOfSchema> list) { - setChild(list, 8); + setChild(list, 7); } /** * Retrieves the number of children in the AllOfSchema list. @@ -1446,7 +1422,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.ListChild(name="AllOfSchema") public JastAddList<AllOfSchema> getAllOfSchemaList() { - JastAddList<AllOfSchema> list = (JastAddList<AllOfSchema>) getChild(8); + JastAddList<AllOfSchema> list = (JastAddList<AllOfSchema>) getChild(7); return list; } /** @@ -1456,7 +1432,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public JastAddList<AllOfSchema> getAllOfSchemaListNoTransform() { - return (JastAddList<AllOfSchema>) getChildNoTransform(8); + return (JastAddList<AllOfSchema>) getChildNoTransform(7); } /** * @return the element at index {@code i} in the AllOfSchema list without @@ -1488,7 +1464,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel high-level */ public void setAnyOfSchemaList(JastAddList<AnyOfSchema> list) { - setChild(list, 9); + setChild(list, 8); } /** * Retrieves the number of children in the AnyOfSchema list. @@ -1556,7 +1532,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.ListChild(name="AnyOfSchema") public JastAddList<AnyOfSchema> getAnyOfSchemaList() { - JastAddList<AnyOfSchema> list = (JastAddList<AnyOfSchema>) getChild(9); + JastAddList<AnyOfSchema> list = (JastAddList<AnyOfSchema>) getChild(8); return list; } /** @@ -1566,7 +1542,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public JastAddList<AnyOfSchema> getAnyOfSchemaListNoTransform() { - return (JastAddList<AnyOfSchema>) getChildNoTransform(9); + return (JastAddList<AnyOfSchema>) getChildNoTransform(8); } /** * @return the element at index {@code i} in the AnyOfSchema list without @@ -1598,7 +1574,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel high-level */ public void setOneOfSchemaList(JastAddList<OneOfSchema> list) { - setChild(list, 10); + setChild(list, 9); } /** * Retrieves the number of children in the OneOfSchema list. @@ -1666,7 +1642,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.ListChild(name="OneOfSchema") public JastAddList<OneOfSchema> getOneOfSchemaList() { - JastAddList<OneOfSchema> list = (JastAddList<OneOfSchema>) getChild(10); + JastAddList<OneOfSchema> list = (JastAddList<OneOfSchema>) getChild(9); return list; } /** @@ -1676,7 +1652,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public JastAddList<OneOfSchema> getOneOfSchemaListNoTransform() { - return (JastAddList<OneOfSchema>) getChildNoTransform(10); + return (JastAddList<OneOfSchema>) getChildNoTransform(9); } /** * @return the element at index {@code i} in the OneOfSchema list without @@ -1707,40 +1683,40 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @param value The new value for the lexeme ReadOnly. * @apilevel high-level */ - public void setReadOnly(Object value) { - tokenObject_ReadOnly = value; + public void setReadOnly(Boolean value) { + tokenBoolean_ReadOnly = value; } /** @apilevel internal */ - protected Object tokenObject_ReadOnly; + protected Boolean tokenBoolean_ReadOnly; /** * Retrieves the value for the lexeme ReadOnly. * @return The value for the lexeme ReadOnly. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="ReadOnly") - public Object getReadOnly() { - return tokenObject_ReadOnly; + public Boolean getReadOnly() { + return tokenBoolean_ReadOnly; } /** * Replaces the lexeme WriteOnly. * @param value The new value for the lexeme WriteOnly. * @apilevel high-level */ - public void setWriteOnly(Object value) { - tokenObject_WriteOnly = value; + public void setWriteOnly(Boolean value) { + tokenBoolean_WriteOnly = value; } /** @apilevel internal */ - protected Object tokenObject_WriteOnly; + protected Boolean tokenBoolean_WriteOnly; /** * Retrieves the value for the lexeme WriteOnly. * @return The value for the lexeme WriteOnly. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="WriteOnly") - public Object getWriteOnly() { - return tokenObject_WriteOnly; + public Boolean getWriteOnly() { + return tokenBoolean_WriteOnly; } /** * Replaces the lexeme Type. @@ -1787,20 +1763,20 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @param value The new value for the lexeme UniqueItems. * @apilevel high-level */ - public void setUniqueItems(Object value) { - tokenObject_UniqueItems = value; + public void setUniqueItems(Boolean value) { + tokenBoolean_UniqueItems = value; } /** @apilevel internal */ - protected Object tokenObject_UniqueItems; + protected Boolean tokenBoolean_UniqueItems; /** * Retrieves the value for the lexeme UniqueItems. * @return The value for the lexeme UniqueItems. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="UniqueItems") - public Object getUniqueItems() { - return tokenObject_UniqueItems; + public Boolean getUniqueItems() { + return tokenBoolean_UniqueItems; } /** * Replaces the optional node for the XmlObject child. This is the <code>Opt</code> @@ -1809,7 +1785,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public void setXmlObjectOpt(Opt<XmlObject> opt) { - setChild(opt, 11); + setChild(opt, 10); } /** * Replaces the (optional) XmlObject child. @@ -1842,7 +1818,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.OptChild(name="XmlObject") public Opt<XmlObject> getXmlObjectOpt() { - return (Opt<XmlObject>) getChild(11); + return (Opt<XmlObject>) getChild(10); } /** * Retrieves the optional node for child XmlObject. This is the <code>Opt</code> node containing the child XmlObject, not the actual child! @@ -1851,7 +1827,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @apilevel low-level */ public Opt<XmlObject> getXmlObjectOptNoTransform() { - return (Opt<XmlObject>) getChildNoTransform(11); + return (Opt<XmlObject>) getChildNoTransform(10); } /** * Replaces the lexeme Ref. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaReferenceTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaReferenceTuple.java deleted file mode 100644 index 8c674ef8a965b5dea45b2ca06ff805eae7b4a663..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaReferenceTuple.java +++ /dev/null @@ -1,199 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:32 - * @astdecl SchemaReferenceTuple : SchemasTuple ::= <Name:String> <Ref:String>; - * @production SchemaReferenceTuple : {@link SchemasTuple} ::= <span class="component"><Name:String></span> <span class="component"><Ref:String></span>; - - */ -public class SchemaReferenceTuple extends SchemasTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public SchemaReferenceTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Ref"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public SchemaReferenceTuple(String p0, String p1) { - setName(p0); - setRef(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public SchemaReferenceTuple clone() throws CloneNotSupportedException { - SchemaReferenceTuple node = (SchemaReferenceTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public SchemaReferenceTuple copy() { - try { - SchemaReferenceTuple node = (SchemaReferenceTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public SchemaReferenceTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public SchemaReferenceTuple treeCopyNoTransform() { - SchemaReferenceTuple tree = (SchemaReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public SchemaReferenceTuple treeCopy() { - SchemaReferenceTuple tree = (SchemaReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((SchemaReferenceTuple) node).tokenString_Name) && (tokenString_Ref == ((SchemaReferenceTuple) node).tokenString_Ref); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObjectTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaTuple.java similarity index 74% rename from src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObjectTuple.java rename to src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaTuple.java index 6711e4903ab9ce5d4e2aa36f556a007cde796e8c..c3d13bc14c68cb0783d0b6698166df78a41e770a 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObjectTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaTuple.java @@ -4,21 +4,22 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:31 - * @astdecl SchemaObjectTuple : SchemasTuple ::= <Name:String> SchemaObject; - * @production SchemaObjectTuple : {@link SchemasTuple} ::= <span class="component"><Name:String></span> <span class="component">{@link SchemaObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:23 + * @astdecl SchemaTuple : ASTNode ::= <Key:String> SchemaObject; + * @production SchemaTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link SchemaObject}</span>; */ -public class SchemaObjectTuple extends SchemasTuple implements Cloneable { +public class SchemaTuple extends ASTNode<ASTNode> implements Cloneable { /** * @declaredat ASTNode:1 */ - public SchemaObjectTuple() { + public SchemaTuple() { super(); } /** @@ -35,12 +36,12 @@ public class SchemaObjectTuple extends SchemasTuple implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "SchemaObject"}, + name = {"Key", "SchemaObject"}, type = {"String", "SchemaObject"}, kind = {"Token", "Child"} ) - public SchemaObjectTuple(String p0, SchemaObject p1) { - setName(p0); + public SchemaTuple(String p0, SchemaObject p1) { + setKey(p0); setChild(p1, 0); } /** @apilevel low-level @@ -71,16 +72,16 @@ public class SchemaObjectTuple extends SchemasTuple implements Cloneable { /** @apilevel internal * @declaredat ASTNode:41 */ - public SchemaObjectTuple clone() throws CloneNotSupportedException { - SchemaObjectTuple node = (SchemaObjectTuple) super.clone(); + public SchemaTuple clone() throws CloneNotSupportedException { + SchemaTuple node = (SchemaTuple) super.clone(); return node; } /** @apilevel internal * @declaredat ASTNode:46 */ - public SchemaObjectTuple copy() { + public SchemaTuple copy() { try { - SchemaObjectTuple node = (SchemaObjectTuple) clone(); + SchemaTuple node = (SchemaTuple) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); @@ -99,7 +100,7 @@ public class SchemaObjectTuple extends SchemasTuple implements Cloneable { * @declaredat ASTNode:65 */ @Deprecated - public SchemaObjectTuple fullCopy() { + public SchemaTuple fullCopy() { return treeCopyNoTransform(); } /** @@ -109,8 +110,8 @@ public class SchemaObjectTuple extends SchemasTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:75 */ - public SchemaObjectTuple treeCopyNoTransform() { - SchemaObjectTuple tree = (SchemaObjectTuple) copy(); + public SchemaTuple treeCopyNoTransform() { + SchemaTuple tree = (SchemaTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; @@ -130,8 +131,8 @@ public class SchemaObjectTuple extends SchemasTuple implements Cloneable { * @apilevel low-level * @declaredat ASTNode:95 */ - public SchemaObjectTuple treeCopy() { - SchemaObjectTuple tree = (SchemaObjectTuple) copy(); + public SchemaTuple treeCopy() { + SchemaTuple tree = (SchemaTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); @@ -147,27 +148,27 @@ public class SchemaObjectTuple extends SchemasTuple implements Cloneable { * @declaredat ASTNode:109 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((SchemaObjectTuple) node).tokenString_Name); + return super.is$Equal(node) && (tokenString_Key == ((SchemaTuple) node).tokenString_Key); } /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. + * Replaces the lexeme Key. + * @param value The new value for the lexeme Key. * @apilevel high-level */ - public void setName(String value) { - tokenString_Name = value; + public void setKey(String value) { + tokenString_Key = value; } /** @apilevel internal */ - protected String tokenString_Name; + protected String tokenString_Key; /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. + * Retrieves the value for the lexeme Key. + * @return The value for the lexeme Key. * @apilevel high-level */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; + @ASTNodeAnnotation.Token(name="Key") + public String getKey() { + return tokenString_Key != null ? tokenString_Key : ""; } /** * Replaces the SchemaObject child. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemasTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemasTuple.java deleted file mode 100644 index 78a32323504825f9ef98d0c95a070699690d4044..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemasTuple.java +++ /dev/null @@ -1,100 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:30 - * @astdecl SchemasTuple : ASTNode; - * @production SchemasTuple : {@link ASTNode}; - - */ -public abstract class SchemasTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public SchemasTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** @apilevel low-level - * @declaredat ASTNode:13 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:19 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:23 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:27 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public SchemasTuple clone() throws CloneNotSupportedException { - SchemasTuple node = (SchemasTuple) super.clone(); - return node; - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:42 - */ - @Deprecated - public abstract SchemasTuple fullCopy(); - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:50 - */ - public abstract SchemasTuple treeCopyNoTransform(); - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:58 - */ - public abstract SchemasTuple treeCopy(); - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ScopesTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ScopesTuple.java index 5795bc2036a01f90e4ec2b67eb70ee0e0f656de5..1e641b7d1ecbf3b63cd629815927b2dc7d617844 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ScopesTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ScopesTuple.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:160 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:121 * @astdecl ScopesTuple : ASTNode ::= <ScopesKey:String> <ScopesValue:String>; * @production ScopesTuple : {@link ASTNode} ::= <span class="component"><ScopesKey:String></span> <span class="component"><ScopesValue:String></span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.java index ab52738d896e0d124769695e74e26365635cd5ab..9d1e446c94c47b9290491591046510eb2a38eda6 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:6 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:124 * @astdecl SecurityRequirementObject : ASTNode ::= SecurityRequirementTuple*; * @production SecurityRequirementObject : {@link ASTNode} ::= <span class="component">{@link SecurityRequirementTuple}*</span>; @@ -17,7 +18,7 @@ import java.net.URL; public class SecurityRequirementObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:734 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:767 */ public static SecurityRequirement composeSecurityRequirement (SecurityRequirementObject securityRequirementObject){ SecurityRequirement securityRequirement = new SecurityRequirement(); @@ -37,7 +38,7 @@ public class SecurityRequirementObject extends ASTNode<ASTNode> implements Clone } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:826 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:807 */ public static SecurityRequirementObject parseSecurityRequirement(SecurityRequirement securityRequirement){ SecurityRequirementObject securityRequirementObject = new SecurityRequirementObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementTuple.java index b69dd08e0dcbd6dee162fb6ddc641b0ee0145950..6921d8fc5627c702964e265b5b8e93376713fe70 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementTuple.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:164 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:125 * @astdecl SecurityRequirementTuple : ASTNode ::= <Name:String> SecurityRequirementValue*; * @production SecurityRequirementTuple : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component">{@link SecurityRequirementValue}*</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementValue.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementValue.java index dd452952326063ba5102a3340c6828b2ffa51e12..815092c1efaa0cc2527c30c5341279c626197a1f 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementValue.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementValue.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:165 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:126 * @astdecl SecurityRequirementValue : ASTNode ::= <Value:String>; * @production SecurityRequirementValue : {@link ASTNode} ::= <span class="component"><Value:String></span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.java index 2c41bdd823b4cd11803a0bcfa1e398a031d551de..bf3704bc3ab3cd7939d9e40b7a508fc86f252648 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.java @@ -4,20 +4,21 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:148 - * @astdecl SecuritySchemeObject : ASTNode ::= <Type:String> <Description:String> <Name:String> <In:String> <Scheme:String> <BearerFormat:String> Flows <OpenIdConnectUrl:String>; - * @production SecuritySchemeObject : {@link ASTNode} ::= <span class="component"><Type:String></span> <span class="component"><Description:String></span> <span class="component"><Name:String></span> <span class="component"><In:String></span> <span class="component"><Scheme:String></span> <span class="component"><BearerFormat:String></span> <span class="component">{@link Flows}</span> <span class="component"><OpenIdConnectUrl:String></span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:110 + * @astdecl SecuritySchemeObject : ASTNode ::= <Type:String> <Description:String> <Name:String> <In:String> <Scheme:String> <BearerFormat:String> OAuthFlowsObject <OpenIdConnectUrl:String> <Ref:String>; + * @production SecuritySchemeObject : {@link ASTNode} ::= <span class="component"><Type:String></span> <span class="component"><Description:String></span> <span class="component"><Name:String></span> <span class="component"><In:String></span> <span class="component"><Scheme:String></span> <span class="component"><BearerFormat:String></span> <span class="component">{@link OAuthFlowsObject}</span> <span class="component"><OpenIdConnectUrl:String></span> <span class="component"><Ref:String></span>; */ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:685 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:718 */ public static SecurityScheme composeSecurityScheme (SecuritySchemeObject securitySchemeObject){ SecurityScheme securityScheme = new SecurityScheme(); @@ -27,7 +28,7 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable securityScheme.setIn( securitySchemeObject.getIn() ); securityScheme.setScheme( securitySchemeObject.getScheme() ); securityScheme.setOpenIdConnectUrl( securitySchemeObject.getOpenIdConnectUrl() ); - securityScheme.setFlows( OAuthFlowsObject.composeOAuthFlows( securitySchemeObject.getFlows().getOAuthFlowsObject() ) ); + securityScheme.setFlows( OAuthFlowsObject.composeOAuthFlows( securitySchemeObject.getOAuthFlowsObject() ) ); if( !securitySchemeObject.getDescription().isEmpty() ) securityScheme.setDescription( securitySchemeObject.getDescription() ); @@ -38,19 +39,17 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:768 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:751 */ public static SecuritySchemeObject parseSecurityScheme(SecurityScheme securityScheme){ SecuritySchemeObject securitySchemeObject = new SecuritySchemeObject(); - Flows flows = new Flows(); securitySchemeObject.setType( securityScheme.getType() ); securitySchemeObject.setName( securityScheme.getName() ); securitySchemeObject.setIn( securityScheme.getIn() ); securitySchemeObject.setScheme( securityScheme.getScheme() ); securitySchemeObject.setOpenIdConnectUrl( securityScheme.getOpenIdConnectUrl() ); - flows.setOAuthFlowsObject( OAuthFlowsObject.parseOAuthFlows(securityScheme.getFlows()) ); - securitySchemeObject.setFlows( flows ); + securitySchemeObject.setOAuthFlowsObject( OAuthFlowsObject.parseOAuthFlows(securityScheme.getFlows()) ); if( securityScheme.getDescription() != null ) securitySchemeObject.setDescription( securityScheme.getDescription() ); @@ -79,11 +78,11 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Type", "Description", "Name", "In", "Scheme", "BearerFormat", "Flows", "OpenIdConnectUrl"}, - type = {"String", "String", "String", "String", "String", "String", "Flows", "String"}, - kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Child", "Token"} + name = {"Type", "Description", "Name", "In", "Scheme", "BearerFormat", "OAuthFlowsObject", "OpenIdConnectUrl", "Ref"}, + type = {"String", "String", "String", "String", "String", "String", "OAuthFlowsObject", "String", "String"}, + kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Child", "Token", "Token"} ) - public SecuritySchemeObject(String p0, String p1, String p2, String p3, String p4, String p5, Flows p6, String p7) { + public SecuritySchemeObject(String p0, String p1, String p2, String p3, String p4, String p5, OAuthFlowsObject p6, String p7, String p8) { setType(p0); setDescription(p1); setName(p2); @@ -92,41 +91,42 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable setBearerFormat(p5); setChild(p6, 0); setOpenIdConnectUrl(p7); + setRef(p8); } /** @apilevel low-level - * @declaredat ASTNode:29 + * @declaredat ASTNode:30 */ protected int numChildren() { return 1; } /** * @apilevel internal - * @declaredat ASTNode:35 + * @declaredat ASTNode:36 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:39 + * @declaredat ASTNode:40 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:43 + * @declaredat ASTNode:44 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:47 + * @declaredat ASTNode:48 */ public SecuritySchemeObject clone() throws CloneNotSupportedException { SecuritySchemeObject node = (SecuritySchemeObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:52 + * @declaredat ASTNode:53 */ public SecuritySchemeObject copy() { try { @@ -146,7 +146,7 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:71 + * @declaredat ASTNode:72 */ @Deprecated public SecuritySchemeObject fullCopy() { @@ -157,7 +157,7 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:81 + * @declaredat ASTNode:82 */ public SecuritySchemeObject treeCopyNoTransform() { SecuritySchemeObject tree = (SecuritySchemeObject) copy(); @@ -178,7 +178,7 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:101 + * @declaredat ASTNode:102 */ public SecuritySchemeObject treeCopy() { SecuritySchemeObject tree = (SecuritySchemeObject) copy(); @@ -194,10 +194,10 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable return tree; } /** @apilevel internal - * @declaredat ASTNode:115 + * @declaredat ASTNode:116 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Type == ((SecuritySchemeObject) node).tokenString_Type) && (tokenString_Description == ((SecuritySchemeObject) node).tokenString_Description) && (tokenString_Name == ((SecuritySchemeObject) node).tokenString_Name) && (tokenString_In == ((SecuritySchemeObject) node).tokenString_In) && (tokenString_Scheme == ((SecuritySchemeObject) node).tokenString_Scheme) && (tokenString_BearerFormat == ((SecuritySchemeObject) node).tokenString_BearerFormat) && (tokenString_OpenIdConnectUrl == ((SecuritySchemeObject) node).tokenString_OpenIdConnectUrl); + return super.is$Equal(node) && (tokenString_Type == ((SecuritySchemeObject) node).tokenString_Type) && (tokenString_Description == ((SecuritySchemeObject) node).tokenString_Description) && (tokenString_Name == ((SecuritySchemeObject) node).tokenString_Name) && (tokenString_In == ((SecuritySchemeObject) node).tokenString_In) && (tokenString_Scheme == ((SecuritySchemeObject) node).tokenString_Scheme) && (tokenString_BearerFormat == ((SecuritySchemeObject) node).tokenString_BearerFormat) && (tokenString_OpenIdConnectUrl == ((SecuritySchemeObject) node).tokenString_OpenIdConnectUrl) && (tokenString_Ref == ((SecuritySchemeObject) node).tokenString_Ref); } /** * Replaces the lexeme Type. @@ -320,30 +320,30 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable return tokenString_BearerFormat != null ? tokenString_BearerFormat : ""; } /** - * Replaces the Flows child. - * @param node The new node to replace the Flows child. + * Replaces the OAuthFlowsObject child. + * @param node The new node to replace the OAuthFlowsObject child. * @apilevel high-level */ - public void setFlows(Flows node) { + public void setOAuthFlowsObject(OAuthFlowsObject node) { setChild(node, 0); } /** - * Retrieves the Flows child. - * @return The current node used as the Flows child. + * Retrieves the OAuthFlowsObject child. + * @return The current node used as the OAuthFlowsObject child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="Flows") - public Flows getFlows() { - return (Flows) getChild(0); + @ASTNodeAnnotation.Child(name="OAuthFlowsObject") + public OAuthFlowsObject getOAuthFlowsObject() { + return (OAuthFlowsObject) getChild(0); } /** - * Retrieves the Flows child. + * Retrieves the OAuthFlowsObject child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the Flows child. + * @return The current node used as the OAuthFlowsObject child. * @apilevel low-level */ - public Flows getFlowsNoTransform() { - return (Flows) getChildNoTransform(0); + public OAuthFlowsObject getOAuthFlowsObjectNoTransform() { + return (OAuthFlowsObject) getChildNoTransform(0); } /** * Replaces the lexeme OpenIdConnectUrl. @@ -365,6 +365,26 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable public String getOpenIdConnectUrl() { return tokenString_OpenIdConnectUrl != null ? tokenString_OpenIdConnectUrl : ""; } + /** + * Replaces the lexeme Ref. + * @param value The new value for the lexeme Ref. + * @apilevel high-level + */ + public void setRef(String value) { + tokenString_Ref = value; + } + /** @apilevel internal + */ + protected String tokenString_Ref; + /** + * Retrieves the value for the lexeme Ref. + * @return The value for the lexeme Ref. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="Ref") + public String getRef() { + return tokenString_Ref != null ? tokenString_Ref : ""; + } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeReferenceTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeReferenceTuple.java deleted file mode 100644 index 368b634e9696782a0c3da1c1d25a2ccca8c1045a..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeReferenceTuple.java +++ /dev/null @@ -1,199 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:50 - * @astdecl SecuritySchemeReferenceTuple : SecuritySchemesTuple ::= <Name:String> <Ref:String>; - * @production SecuritySchemeReferenceTuple : {@link SecuritySchemesTuple} ::= <span class="component"><Name:String></span> <span class="component"><Ref:String></span>; - - */ -public class SecuritySchemeReferenceTuple extends SecuritySchemesTuple implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public SecuritySchemeReferenceTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** - * @declaredat ASTNode:12 - */ - @ASTNodeAnnotation.Constructor( - name = {"Name", "Ref"}, - type = {"String", "String"}, - kind = {"Token", "Token"} - ) - public SecuritySchemeReferenceTuple(String p0, String p1) { - setName(p0); - setRef(p1); - } - /** @apilevel low-level - * @declaredat ASTNode:22 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:28 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:32 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:36 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:40 - */ - public SecuritySchemeReferenceTuple clone() throws CloneNotSupportedException { - SecuritySchemeReferenceTuple node = (SecuritySchemeReferenceTuple) super.clone(); - return node; - } - /** @apilevel internal - * @declaredat ASTNode:45 - */ - public SecuritySchemeReferenceTuple copy() { - try { - SecuritySchemeReferenceTuple node = (SecuritySchemeReferenceTuple) clone(); - node.parent = null; - if (children != null) { - node.children = (ASTNode[]) children.clone(); - } - return node; - } catch (CloneNotSupportedException e) { - throw new Error("Error: clone not supported for " + getClass().getName()); - } - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:64 - */ - @Deprecated - public SecuritySchemeReferenceTuple fullCopy() { - return treeCopyNoTransform(); - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:74 - */ - public SecuritySchemeReferenceTuple treeCopyNoTransform() { - SecuritySchemeReferenceTuple tree = (SecuritySchemeReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) children[i]; - if (child != null) { - child = child.treeCopyNoTransform(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:94 - */ - public SecuritySchemeReferenceTuple treeCopy() { - SecuritySchemeReferenceTuple tree = (SecuritySchemeReferenceTuple) copy(); - if (children != null) { - for (int i = 0; i < children.length; ++i) { - ASTNode child = (ASTNode) getChild(i); - if (child != null) { - child = child.treeCopy(); - tree.setChild(child, i); - } - } - } - return tree; - } - /** @apilevel internal - * @declaredat ASTNode:108 - */ - protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((SecuritySchemeReferenceTuple) node).tokenString_Name) && (tokenString_Ref == ((SecuritySchemeReferenceTuple) node).tokenString_Ref); - } - /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. - * @apilevel high-level - */ - public void setName(String value) { - tokenString_Name = value; - } - /** @apilevel internal - */ - protected String tokenString_Name; - /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; - } - /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. - * @apilevel high-level - */ - public void setRef(String value) { - tokenString_Ref = value; - } - /** @apilevel internal - */ - protected String tokenString_Ref; - /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. - * @apilevel high-level - */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; - } - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObjectTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeTuple.java similarity index 72% rename from src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObjectTuple.java rename to src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeTuple.java index 10dbc1e121f3d4caa6413dfd3fe5b0e18ccd7d78..0f5c02b872c73dbb71e3b0bd1c724906c269df82 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObjectTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeTuple.java @@ -4,21 +4,22 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:49 - * @astdecl SecuritySchemeObjectTuple : SecuritySchemesTuple ::= <Name:String> SecuritySchemeObject; - * @production SecuritySchemeObjectTuple : {@link SecuritySchemesTuple} ::= <span class="component"><Name:String></span> <span class="component">{@link SecuritySchemeObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:29 + * @astdecl SecuritySchemeTuple : ASTNode ::= <Key:String> SecuritySchemeObject; + * @production SecuritySchemeTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link SecuritySchemeObject}</span>; */ -public class SecuritySchemeObjectTuple extends SecuritySchemesTuple implements Cloneable { +public class SecuritySchemeTuple extends ASTNode<ASTNode> implements Cloneable { /** * @declaredat ASTNode:1 */ - public SecuritySchemeObjectTuple() { + public SecuritySchemeTuple() { super(); } /** @@ -35,12 +36,12 @@ public class SecuritySchemeObjectTuple extends SecuritySchemesTuple implements C * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "SecuritySchemeObject"}, + name = {"Key", "SecuritySchemeObject"}, type = {"String", "SecuritySchemeObject"}, kind = {"Token", "Child"} ) - public SecuritySchemeObjectTuple(String p0, SecuritySchemeObject p1) { - setName(p0); + public SecuritySchemeTuple(String p0, SecuritySchemeObject p1) { + setKey(p0); setChild(p1, 0); } /** @apilevel low-level @@ -71,16 +72,16 @@ public class SecuritySchemeObjectTuple extends SecuritySchemesTuple implements C /** @apilevel internal * @declaredat ASTNode:41 */ - public SecuritySchemeObjectTuple clone() throws CloneNotSupportedException { - SecuritySchemeObjectTuple node = (SecuritySchemeObjectTuple) super.clone(); + public SecuritySchemeTuple clone() throws CloneNotSupportedException { + SecuritySchemeTuple node = (SecuritySchemeTuple) super.clone(); return node; } /** @apilevel internal * @declaredat ASTNode:46 */ - public SecuritySchemeObjectTuple copy() { + public SecuritySchemeTuple copy() { try { - SecuritySchemeObjectTuple node = (SecuritySchemeObjectTuple) clone(); + SecuritySchemeTuple node = (SecuritySchemeTuple) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); @@ -99,7 +100,7 @@ public class SecuritySchemeObjectTuple extends SecuritySchemesTuple implements C * @declaredat ASTNode:65 */ @Deprecated - public SecuritySchemeObjectTuple fullCopy() { + public SecuritySchemeTuple fullCopy() { return treeCopyNoTransform(); } /** @@ -109,8 +110,8 @@ public class SecuritySchemeObjectTuple extends SecuritySchemesTuple implements C * @apilevel low-level * @declaredat ASTNode:75 */ - public SecuritySchemeObjectTuple treeCopyNoTransform() { - SecuritySchemeObjectTuple tree = (SecuritySchemeObjectTuple) copy(); + public SecuritySchemeTuple treeCopyNoTransform() { + SecuritySchemeTuple tree = (SecuritySchemeTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; @@ -130,8 +131,8 @@ public class SecuritySchemeObjectTuple extends SecuritySchemesTuple implements C * @apilevel low-level * @declaredat ASTNode:95 */ - public SecuritySchemeObjectTuple treeCopy() { - SecuritySchemeObjectTuple tree = (SecuritySchemeObjectTuple) copy(); + public SecuritySchemeTuple treeCopy() { + SecuritySchemeTuple tree = (SecuritySchemeTuple) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); @@ -147,27 +148,27 @@ public class SecuritySchemeObjectTuple extends SecuritySchemesTuple implements C * @declaredat ASTNode:109 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((SecuritySchemeObjectTuple) node).tokenString_Name); + return super.is$Equal(node) && (tokenString_Key == ((SecuritySchemeTuple) node).tokenString_Key); } /** - * Replaces the lexeme Name. - * @param value The new value for the lexeme Name. + * Replaces the lexeme Key. + * @param value The new value for the lexeme Key. * @apilevel high-level */ - public void setName(String value) { - tokenString_Name = value; + public void setKey(String value) { + tokenString_Key = value; } /** @apilevel internal */ - protected String tokenString_Name; + protected String tokenString_Key; /** - * Retrieves the value for the lexeme Name. - * @return The value for the lexeme Name. + * Retrieves the value for the lexeme Key. + * @return The value for the lexeme Key. * @apilevel high-level */ - @ASTNodeAnnotation.Token(name="Name") - public String getName() { - return tokenString_Name != null ? tokenString_Name : ""; + @ASTNodeAnnotation.Token(name="Key") + public String getKey() { + return tokenString_Key != null ? tokenString_Key : ""; } /** * Replaces the SecuritySchemeObject child. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemesTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemesTuple.java deleted file mode 100644 index d222192d61cab1d63cf3c635c3a118e5b35ad9e2..0000000000000000000000000000000000000000 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemesTuple.java +++ /dev/null @@ -1,100 +0,0 @@ -/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.2 */ -package de.tudresden.inf.st.openapi.ast; -import org.openapi4j.core.exception.ResolutionException; -import org.openapi4j.core.validation.ValidationException; -import org.openapi4j.parser.model.v3.*; -import org.openapi4j.core.model.reference.Reference; -import java.io.IOException; -import java.util.*; -import java.net.URL; -/** - * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:48 - * @astdecl SecuritySchemesTuple : ASTNode; - * @production SecuritySchemesTuple : {@link ASTNode}; - - */ -public abstract class SecuritySchemesTuple extends ASTNode<ASTNode> implements Cloneable { - /** - * @declaredat ASTNode:1 - */ - public SecuritySchemesTuple() { - super(); - } - /** - * Initializes the child array to the correct size. - * Initializes List and Opt nta children. - * @apilevel internal - * @ast method - * @declaredat ASTNode:10 - */ - public void init$Children() { - } - /** @apilevel low-level - * @declaredat ASTNode:13 - */ - protected int numChildren() { - return 0; - } - /** - * @apilevel internal - * @declaredat ASTNode:19 - */ - public boolean mayHaveRewrite() { - return false; - } - /** @apilevel internal - * @declaredat ASTNode:23 - */ - public void flushAttrCache() { - super.flushAttrCache(); - } - /** @apilevel internal - * @declaredat ASTNode:27 - */ - public void flushCollectionCache() { - super.flushCollectionCache(); - } - /** @apilevel internal - * @declaredat ASTNode:31 - */ - public SecuritySchemesTuple clone() throws CloneNotSupportedException { - SecuritySchemesTuple node = (SecuritySchemesTuple) super.clone(); - return node; - } - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:42 - */ - @Deprecated - public abstract SecuritySchemesTuple fullCopy(); - /** - * Create a deep copy of the AST subtree at this node. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:50 - */ - public abstract SecuritySchemesTuple treeCopyNoTransform(); - /** - * Create a deep copy of the AST subtree at this node. - * The subtree of this node is traversed to trigger rewrites before copy. - * The copy is dangling, i.e. has no parent. - * @return dangling copy of the subtree at this node - * @apilevel low-level - * @declaredat ASTNode:58 - */ - public abstract SecuritySchemesTuple treeCopy(); - /** @apilevel internal */ - public ASTNode rewriteTo() { - return super.rewriteTo(); - } - /** @apilevel internal */ - public boolean canRewrite() { - return false; - } -} diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerObject.java index 634800f6901fbeec28c178ec17315b8b8de56bde..8258e8c9502693e25ae2ec3c99e58495d6589901 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerObject.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:4 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:14 * @astdecl ServerObject : ASTNode ::= <Url:String> <Description:String> ServerVariablesTuple*; * @production ServerObject : {@link ASTNode} ::= <span class="component"><Url:String></span> <span class="component"><Description:String></span> <span class="component">{@link ServerVariablesTuple}*</span>; @@ -17,13 +18,13 @@ import java.net.URL; public class ServerObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:92 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:97 */ public static Server composeServer (ServerObject serverObject){ Server server = new Server(); - server.setUrl( serverObject.getUrl() ); - + if( !serverObject.getUrl().isEmpty() ) + server.setUrl(serverObject.getUrl()); if( !serverObject.getDescription().isEmpty() ) server.setDescription( serverObject.getDescription() ); if( serverObject.hasServerVariablesTuple() ){ @@ -37,15 +38,15 @@ public class ServerObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:73 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:79 */ public static ServerObject parseServer(Server server){ ServerObject serverObject = new ServerObject(); - serverObject.setUrl( server.getUrl() ); - + if( server.getUrl() != null ) + serverObject.setUrl(server.getUrl()); if( server.getDescription() != null ) - serverObject.setDescription( server.getDescription() ); + serverObject.setDescription(server.getDescription()); if( server.getVariables() != null ){ for (String key : server.getVariables().keySet()) serverObject.addServerVariablesTuple(new ServerVariablesTuple(key, ServerVariableObject.parseServerVariable(server.getVariable(key)))); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariableObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariableObject.java index edc92f696c9c75a5afbe60a6520b3aa8c6ad7dc4..be3ed81c7a46e43e64a19837baa8e098a040adc1 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariableObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariableObject.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:25 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:18 * @astdecl ServerVariableObject : ASTNode ::= Enum* <Default:String> <Description:String>; * @production ServerVariableObject : {@link ASTNode} ::= <span class="component">{@link Enum}*</span> <span class="component"><Default:String></span> <span class="component"><Description:String></span>; @@ -17,15 +18,15 @@ import java.net.URL; public class ServerVariableObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:109 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:114 */ public static ServerVariable composeServerVariable (ServerVariableObject serverVariableObject){ ServerVariable serverVariable = new ServerVariable(); - serverVariable.setDefault( serverVariableObject.getDefault() ); - + if( !serverVariableObject.getDefault().isEmpty() ) + serverVariable.setDefault(serverVariableObject.getDefault()); if( !serverVariableObject.getDescription().isEmpty() ) - serverVariable.setDescription( serverVariableObject.getDescription() ); + serverVariable.setDescription(serverVariableObject.getDescription()); if( serverVariableObject.getNumEnum() != 0 ){ List<String> enums = new ArrayList<>(); for( Enum e : serverVariableObject.getEnums() ) @@ -37,15 +38,15 @@ public class ServerVariableObject extends ASTNode<ASTNode> implements Cloneable } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:88 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:94 */ public static ServerVariableObject parseServerVariable(ServerVariable serverVariable){ ServerVariableObject serverVariableObject = new ServerVariableObject(); - serverVariableObject.setDefault( serverVariable.getDefault() ); - + if( serverVariable.getDefault() != null ) + serverVariableObject.setDefault(serverVariable.getDefault()); if( serverVariable.getDescription() != null ) - serverVariableObject.setDescription( serverVariable.getDescription() ); + serverVariableObject.setDescription(serverVariable.getDescription()); if( serverVariable.getEnums() != null ){ for( String e : serverVariable.getEnums() ) serverVariableObject.addEnum(new Enum(e)); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariablesTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariablesTuple.java index beb3e1c51f77d869add4d8d01663a1eff2d1b8c2..a989ea0f8e2a3d5525d0d381ccf199a9708e4b7b 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariablesTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ServerVariablesTuple.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:22 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:15 * @astdecl ServerVariablesTuple : ASTNode ::= <Name:String> ServerVariableObject; * @production ServerVariablesTuple : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component">{@link ServerVariableObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Tag.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Tag.java index a5a042ea843f1f255b19da437fff416cf06843f3..02ec42dc16ffcb1b76b853a2fa8b8eb4f835b3fc 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Tag.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Tag.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:76 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:50 * @astdecl Tag : ASTNode ::= <Tag:String>; * @production Tag : {@link ASTNode} ::= <span class="component"><Tag:String></span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/TagObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/TagObject.java index c13ea8f13fa29a51b1e5aa1fa806447603b6fe9f..6da26707ba69fc6fd672c792bf188eb6aa45241c 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/TagObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/TagObject.java @@ -4,20 +4,21 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:126 - * @astdecl TagObject : ASTNode ::= <Name:String> <Description:String> [ExternalDocumentationObject]; - * @production TagObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Description:String></span> <span class="component">[{@link ExternalDocumentationObject}]</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:88 + * @astdecl TagObject : ASTNode ::= <Name:String> <Description:String> [ExternalDocObject]; + * @production TagObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Description:String></span> <span class="component">[{@link ExternalDocObject}]</span>; */ public class TagObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:551 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:578 */ public static org.openapi4j.parser.model.v3.Tag composeTag (TagObject tagObject){ org.openapi4j.parser.model.v3.Tag tag = new org.openapi4j.parser.model.v3.Tag(); @@ -26,14 +27,14 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { if( !tagObject.getDescription().isEmpty() ) tag.setDescription( tagObject.getDescription() ); - if( tagObject.hasExternalDocumentationObject() ) - tag.setExternalDocs( ExternalDocumentationObject.composeExternalDocs(tagObject.getExternalDocumentationObject()) ); + if( tagObject.hasExternalDocObject() ) + tag.setExternalDocs( ExternalDocObject.composeExternalDocs(tagObject.getExternalDocObject()) ); return tag; } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:605 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:587 */ public static TagObject parseTag(org.openapi4j.parser.model.v3.Tag tag){ TagObject tagObject = new TagObject(); @@ -43,7 +44,7 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { if( tag.getDescription() != null ) tagObject.setDescription( tag.getDescription() ); if( tag.getExternalDocs() != null ) - tagObject.setExternalDocumentationObject( ExternalDocumentationObject.parseExternalDocs(tag.getExternalDocs()) ); + tagObject.setExternalDocObject( ExternalDocObject.parseExternalDocs(tag.getExternalDocs()) ); return tagObject; } @@ -68,11 +69,11 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:14 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "Description", "ExternalDocumentationObject"}, - type = {"String", "String", "Opt<ExternalDocumentationObject>"}, + name = {"Name", "Description", "ExternalDocObject"}, + type = {"String", "String", "Opt<ExternalDocObject>"}, kind = {"Token", "Token", "Opt"} ) - public TagObject(String p0, String p1, Opt<ExternalDocumentationObject> p2) { + public TagObject(String p0, String p1, Opt<ExternalDocObject> p2) { setName(p0); setDescription(p1); setChild(p2, 0); @@ -224,55 +225,55 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { return tokenString_Description != null ? tokenString_Description : ""; } /** - * Replaces the optional node for the ExternalDocumentationObject child. This is the <code>Opt</code> - * node containing the child ExternalDocumentationObject, not the actual child! - * @param opt The new node to be used as the optional node for the ExternalDocumentationObject child. + * Replaces the optional node for the ExternalDocObject child. This is the <code>Opt</code> + * node containing the child ExternalDocObject, not the actual child! + * @param opt The new node to be used as the optional node for the ExternalDocObject child. * @apilevel low-level */ - public void setExternalDocumentationObjectOpt(Opt<ExternalDocumentationObject> opt) { + public void setExternalDocObjectOpt(Opt<ExternalDocObject> opt) { setChild(opt, 0); } /** - * Replaces the (optional) ExternalDocumentationObject child. - * @param node The new node to be used as the ExternalDocumentationObject child. + * Replaces the (optional) ExternalDocObject child. + * @param node The new node to be used as the ExternalDocObject child. * @apilevel high-level */ - public void setExternalDocumentationObject(ExternalDocumentationObject node) { - getExternalDocumentationObjectOpt().setChild(node, 0); + public void setExternalDocObject(ExternalDocObject node) { + getExternalDocObjectOpt().setChild(node, 0); } /** - * Check whether the optional ExternalDocumentationObject child exists. - * @return {@code true} if the optional ExternalDocumentationObject child exists, {@code false} if it does not. + * Check whether the optional ExternalDocObject child exists. + * @return {@code true} if the optional ExternalDocObject child exists, {@code false} if it does not. * @apilevel high-level */ - public boolean hasExternalDocumentationObject() { - return getExternalDocumentationObjectOpt().getNumChild() != 0; + public boolean hasExternalDocObject() { + return getExternalDocObjectOpt().getNumChild() != 0; } /** - * Retrieves the (optional) ExternalDocumentationObject child. - * @return The ExternalDocumentationObject child, if it exists. Returns {@code null} otherwise. + * Retrieves the (optional) ExternalDocObject child. + * @return The ExternalDocObject child, if it exists. Returns {@code null} otherwise. * @apilevel low-level */ - public ExternalDocumentationObject getExternalDocumentationObject() { - return (ExternalDocumentationObject) getExternalDocumentationObjectOpt().getChild(0); + public ExternalDocObject getExternalDocObject() { + return (ExternalDocObject) getExternalDocObjectOpt().getChild(0); } /** - * Retrieves the optional node for the ExternalDocumentationObject child. This is the <code>Opt</code> node containing the child ExternalDocumentationObject, not the actual child! - * @return The optional node for child the ExternalDocumentationObject child. + * Retrieves the optional node for the ExternalDocObject child. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! + * @return The optional node for child the ExternalDocObject child. * @apilevel low-level */ - @ASTNodeAnnotation.OptChild(name="ExternalDocumentationObject") - public Opt<ExternalDocumentationObject> getExternalDocumentationObjectOpt() { - return (Opt<ExternalDocumentationObject>) getChild(0); + @ASTNodeAnnotation.OptChild(name="ExternalDocObject") + public Opt<ExternalDocObject> getExternalDocObjectOpt() { + return (Opt<ExternalDocObject>) getChild(0); } /** - * Retrieves the optional node for child ExternalDocumentationObject. This is the <code>Opt</code> node containing the child ExternalDocumentationObject, not the actual child! + * Retrieves the optional node for child ExternalDocObject. This is the <code>Opt</code> node containing the child ExternalDocObject, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child ExternalDocumentationObject. + * @return The optional node for child ExternalDocObject. * @apilevel low-level */ - public Opt<ExternalDocumentationObject> getExternalDocumentationObjectOptNoTransform() { - return (Opt<ExternalDocumentationObject>) getChildNoTransform(0); + public Opt<ExternalDocObject> getExternalDocObjectOptNoTransform() { + return (Opt<ExternalDocObject>) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Trace.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Trace.java index eec40becaebbce12747c168fb3af59ba048dcbdf..5f1db52545556748adaaab7ed139b57159553d67 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Trace.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Trace.java @@ -4,12 +4,13 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:71 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:46 * @astdecl Trace : ASTNode ::= OperationObject; * @production Trace : {@link ASTNode} ::= <span class="component">{@link OperationObject}</span>; diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/XmlObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/XmlObject.java index a1e31c0344db4cdce2ed166a76887762c34cfcfd..0455ab2bf9fb0def4137f3a15bea11efbfff4dc5 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/XmlObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/XmlObject.java @@ -4,20 +4,21 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; import java.net.URL; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:145 - * @astdecl XmlObject : ASTNode ::= <Name:String> <Namespace:String> <Prefix:String> <Attribute:Object> <Wrapped:Object>; - * @production XmlObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Namespace:String></span> <span class="component"><Prefix:String></span> <span class="component"><Attribute:Object></span> <span class="component"><Wrapped:Object></span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:107 + * @astdecl XmlObject : ASTNode ::= <Name:String> <Namespace:String> <Prefix:String> <Attribute:Boolean> <Wrapped:Boolean>; + * @production XmlObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Namespace:String></span> <span class="component"><Prefix:String></span> <span class="component"><Attribute:Boolean></span> <span class="component"><Wrapped:Boolean></span>; */ public class XmlObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:668 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:701 */ public static Xml composeXml (XmlObject xmlObject) { Xml xml = new Xml(); @@ -37,7 +38,7 @@ public class XmlObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:751 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:734 */ public static XmlObject parseXml (Xml xml) { XmlObject xmlObject = new XmlObject(); @@ -75,10 +76,10 @@ public class XmlObject extends ASTNode<ASTNode> implements Cloneable { */ @ASTNodeAnnotation.Constructor( name = {"Name", "Namespace", "Prefix", "Attribute", "Wrapped"}, - type = {"String", "String", "String", "Object", "Object"}, + type = {"String", "String", "String", "Boolean", "Boolean"}, kind = {"Token", "Token", "Token", "Token", "Token"} ) - public XmlObject(String p0, String p1, String p2, Object p3, Object p4) { + public XmlObject(String p0, String p1, String p2, Boolean p3, Boolean p4) { setName(p0); setNamespace(p1); setPrefix(p2); @@ -189,7 +190,7 @@ public class XmlObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:111 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Name == ((XmlObject) node).tokenString_Name) && (tokenString_Namespace == ((XmlObject) node).tokenString_Namespace) && (tokenString_Prefix == ((XmlObject) node).tokenString_Prefix) && (tokenObject_Attribute == ((XmlObject) node).tokenObject_Attribute) && (tokenObject_Wrapped == ((XmlObject) node).tokenObject_Wrapped); + return super.is$Equal(node) && (tokenString_Name == ((XmlObject) node).tokenString_Name) && (tokenString_Namespace == ((XmlObject) node).tokenString_Namespace) && (tokenString_Prefix == ((XmlObject) node).tokenString_Prefix) && (tokenBoolean_Attribute == ((XmlObject) node).tokenBoolean_Attribute) && (tokenBoolean_Wrapped == ((XmlObject) node).tokenBoolean_Wrapped); } /** * Replaces the lexeme Name. @@ -256,40 +257,40 @@ public class XmlObject extends ASTNode<ASTNode> implements Cloneable { * @param value The new value for the lexeme Attribute. * @apilevel high-level */ - public void setAttribute(Object value) { - tokenObject_Attribute = value; + public void setAttribute(Boolean value) { + tokenBoolean_Attribute = value; } /** @apilevel internal */ - protected Object tokenObject_Attribute; + protected Boolean tokenBoolean_Attribute; /** * Retrieves the value for the lexeme Attribute. * @return The value for the lexeme Attribute. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="Attribute") - public Object getAttribute() { - return tokenObject_Attribute; + public Boolean getAttribute() { + return tokenBoolean_Attribute; } /** * Replaces the lexeme Wrapped. * @param value The new value for the lexeme Wrapped. * @apilevel high-level */ - public void setWrapped(Object value) { - tokenObject_Wrapped = value; + public void setWrapped(Boolean value) { + tokenBoolean_Wrapped = value; } /** @apilevel internal */ - protected Object tokenObject_Wrapped; + protected Boolean tokenBoolean_Wrapped; /** * Retrieves the value for the lexeme Wrapped. * @return The value for the lexeme Wrapped. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="Wrapped") - public Object getWrapped() { - return tokenObject_Wrapped; + public Boolean getWrapped() { + return tokenBoolean_Wrapped; } /** @apilevel internal */ public ASTNode rewriteTo() { diff --git a/src/main/jastadd/Composer.jadd b/src/main/jastadd/Composer.jadd index 6eef511055676989596b3ecc0b220298c30a8d74..e5d20708d2abd8e5801ea4e9b8e436c531ea5ee2 100644 --- a/src/main/jastadd/Composer.jadd +++ b/src/main/jastadd/Composer.jadd @@ -2,6 +2,7 @@ import org.openapi4j.core.exception.ResolutionException; import org.openapi4j.core.validation.ValidationException; import org.openapi4j.parser.model.v3.*; import org.openapi4j.core.model.reference.Reference; +import org.openapi4j.core.model.OAIContext; import java.io.IOException; import java.util.*; @@ -9,40 +10,43 @@ import java.net.URL; aspect Composer { - public static OpenApi3 OpenAPIObject.composeOpenAPI (OpenAPIObject openAPIObject){ + public static OpenApi3 OpenAPIObject.composeOpenAPI (OpenAPIObject openapi){ OpenApi3 api3 = new OpenApi3(); - api3.setOpenapi( openAPIObject.getOpenAPI() ); - api3.setInfo( InfoObject.composeInfo( openAPIObject.getInfoObject() ) ); - - if( openAPIObject.getNumPathsObject() != 0 ){ - Map<String, Path> paths = new HashMap<>(); - for( PathsObject p : openAPIObject.getPathsObjects() ) - paths.put( p.getRef(), PathItemObject.composePath(p.getPathItemObject()) ); - api3.setPaths(paths); - } - if(openAPIObject.getNumServerObject() != 0 ){ + if( !openapi.getOpenAPI().isEmpty() ) + api3.setOpenapi(openapi.getOpenAPI()); + if( openapi.hasInfoObject() ) + api3.setInfo(InfoObject.composeInfo(openapi.getInfoObject())); + if( openapi.getNumServerObject() != 0 ){ List<org.openapi4j.parser.model.v3.Server> servers = new ArrayList<>(); - for( ServerObject s : openAPIObject.getServerObjects() ) + for( ServerObject s : openapi.getServerObjects() ) servers.add(ServerObject.composeServer(s)); api3.setServers(servers); } - if( openAPIObject.hasComponentsObject() ) - api3.setComponents( ComponentsObject.composeComponents(openAPIObject.getComponentsObject()) ); - if( openAPIObject.getNumSecurityRequirementObject() != 0 ){ + if( openapi.getNumPathsObject() != 0 ){ + Map<String, Path> paths = new HashMap<>(); + for( PathsObject p : openapi.getPathsObjects() ) + paths.put( p.getRef(), PathItem.composePath(p.getPathItem()) ); + api3.setPaths(paths); + } + if( openapi.hasComponentsObject() ) + api3.setComponents( ComponentsObject.composeComponents(openapi.getComponentsObject()) ); + if( openapi.getNumSecurityRequirementObject() != 0 ){ List<SecurityRequirement> securityRequirements = new ArrayList<>(); - for( SecurityRequirementObject s : openAPIObject.getSecurityRequirementObjects() ) + for( SecurityRequirementObject s : openapi.getSecurityRequirementObjects() ) securityRequirements.add( SecurityRequirementObject.composeSecurityRequirement( s ) ); api3.setSecurityRequirements(securityRequirements); } - if( openAPIObject.getNumTagObject() != 0 ){ + if( openapi.getNumTagObject() != 0 ){ List<org.openapi4j.parser.model.v3.Tag> tags = new ArrayList<>(); - for( TagObject t : openAPIObject.getTagObjects() ) + for( TagObject t : openapi.getTagObjects() ) tags.add( TagObject.composeTag(t) ); api3.setTags( tags ); } - if( openAPIObject.hasExternalDocumentationObject() ) - api3.setExternalDocs( ExternalDocumentationObject.composeExternalDocs(openAPIObject.getExternalDocumentationObject()) ); + if( openapi.hasExternalDocObject() ) + api3.setExternalDocs(ExternalDocObject.composeExternalDocs(openapi.getExternalDocObject())); + if( openapi.getContext() != null ) + api3.setContext(openapi.getContext()); return api3; } @@ -50,17 +54,18 @@ aspect Composer { public static Info InfoObject.composeInfo (InfoObject infoObject){ Info info = new Info(); - info.setTitle( infoObject.getTitle() ); - info.setVersion( infoObject.getVersion() ); - + if( !infoObject.getTitle().isEmpty() ) + info.setTitle(infoObject.getTitle()); + if( !infoObject.getVersion().isEmpty() ) + info.setVersion(infoObject.getVersion()); if( !infoObject.getDescription().isEmpty() ) - info.setDescription( infoObject.getDescription() ); + info.setDescription(infoObject.getDescription()); if( !infoObject.getTermsOfService().isEmpty() ) - info.setTermsOfService( infoObject.getTermsOfService() ); + info.setTermsOfService(infoObject.getTermsOfService()); if( infoObject.hasContactObject() ) - info.setContact( ContactObject.composeContact(infoObject.getContactObject()) ); + info.setContact(ContactObject.composeContact(infoObject.getContactObject())); if( infoObject.hasLicenseObject() ) - info.setLicense( LicenseObject.composeLicense(infoObject.getLicenseObject()) ); + info.setLicense(LicenseObject.composeLicense(infoObject.getLicenseObject())); return info; } @@ -68,11 +73,11 @@ public static Info InfoObject.composeInfo (InfoObject infoObject){ public static Contact ContactObject.composeContact (ContactObject contactObject){ Contact contact = new Contact(); - if( contactObject.getName() != null ) + if( !contactObject.getName().isEmpty() ) contact.setName( contactObject.getName() ); - if( contactObject.getUrl() != null ) + if( !contactObject.getUrl().isEmpty() ) contact.setUrl( contactObject.getUrl() ); - if( contactObject.getEmail() != null ) + if( !contactObject.getEmail().isEmpty() ) contact.setEmail( contactObject.getEmail() ); return contact; @@ -81,9 +86,9 @@ public static Contact ContactObject.composeContact (ContactObject contactObject) public static License LicenseObject.composeLicense (LicenseObject licenseObject){ License license = new License(); + if( !licenseObject.getName().isEmpty() ) license.setName( licenseObject.getName() ); - - if( licenseObject.getUrl() != null ) + if( !licenseObject.getUrl().isEmpty() ) license.setUrl( licenseObject.getUrl() ); return license; @@ -92,8 +97,8 @@ public static License LicenseObject.composeLicense (LicenseObject licenseObject) public static Server ServerObject.composeServer (ServerObject serverObject){ Server server = new Server(); - server.setUrl( serverObject.getUrl() ); - + if( !serverObject.getUrl().isEmpty() ) + server.setUrl(serverObject.getUrl()); if( !serverObject.getDescription().isEmpty() ) server.setDescription( serverObject.getDescription() ); if( serverObject.hasServerVariablesTuple() ){ @@ -109,10 +114,10 @@ public static Server ServerObject.composeServer (ServerObject serverObject){ public static ServerVariable ServerVariableObject.composeServerVariable (ServerVariableObject serverVariableObject){ ServerVariable serverVariable = new ServerVariable(); - serverVariable.setDefault( serverVariableObject.getDefault() ); - + if( !serverVariableObject.getDefault().isEmpty() ) + serverVariable.setDefault(serverVariableObject.getDefault()); if( !serverVariableObject.getDescription().isEmpty() ) - serverVariable.setDescription( serverVariableObject.getDescription() ); + serverVariable.setDescription(serverVariableObject.getDescription()); if( serverVariableObject.getNumEnum() != 0 ){ List<String> enums = new ArrayList<>(); for( Enum e : serverVariableObject.getEnums() ) @@ -126,147 +131,150 @@ public static ServerVariable ServerVariableObject.composeServerVariable (ServerV public static Components ComponentsObject.composeComponents (ComponentsObject componentsObject){ Components components = new Components(); - if( componentsObject.getNumSchemasTuple() != 0 ){ - Map<String, org.openapi4j.parser.model.v3.Schema> schemas = new HashMap<>(); - for( SchemasTuple t : componentsObject.getSchemasTuples() ){ - if( t instanceof SchemaReferenceTuple ){ - org.openapi4j.parser.model.v3.Schema schema = new org.openapi4j.parser.model.v3.Schema(); - schema.setRef(((SchemaReferenceTuple) t).getRef()); - schemas.put(((SchemaReferenceTuple) t).getName(), schema); + if( componentsObject.getNumSchemaTuple() != 0 ){ + Map<String, org.openapi4j.parser.model.v3.Schema> schemaMap = new HashMap<>(); + for( SchemaTuple t : componentsObject.getSchemaTuples() ){ + if(!t.getSchemaObject().getRef().isEmpty()){ + org.openapi4j.parser.model.v3.Schema schema=new org.openapi4j.parser.model.v3.Schema(); + schema.setRef(t.getSchemaObject().getRef()); + schemaMap.put(t.getKey(),schema); } else - schemas.put(((SchemaObjectTuple)t).getName(), SchemaObject.composeSchema(((SchemaObjectTuple)t).getSchemaObject())); + schemaMap.put(t.getKey(),SchemaObject.composeSchema(t.getSchemaObject())); } - components.setSchemas(schemas); + components.setSchemas(schemaMap); } - if( componentsObject.getNumResponsesTuple() != 0 ){ - Map<String, Response> responses = new HashMap<>(); - for( ResponsesTuple t : componentsObject.getResponsesTuples() ){ - if( t instanceof ResponseReferenceTuple ){ + if( componentsObject.getNumResponseTuple() != 0 ){ + Map<String, Response> responseMap = new HashMap<>(); + for( ResponseTuple t : componentsObject.getResponseTuples() ){ + if( !t.getResponseObject().getRef().isEmpty() ){ Response response = new Response(); - response.setRef(((ResponseReferenceTuple) t).getRef()); - responses.put(((ResponseReferenceTuple) t).getName(), response); + response.setRef(t.getResponseObject().getRef()); + responseMap.put(t.getKey(), response); } else - responses.put(((ResponseObjectTuple)t).getName(), ResponseObject.composeResponse(((ResponseObjectTuple)t).getResponseObject())); + responseMap.put(t.getKey(), ResponseObject.composeResponse(t.getResponseObject())); } - components.setResponses(responses); + components.setResponses(responseMap); } if( componentsObject.getNumParameterTuple() != 0 ){ - Map<String, Parameter> parameters = new HashMap<>(); + Map<String, Parameter> parameterMap = new HashMap<>(); for( ParameterTuple t : componentsObject.getParameterTuples() ){ - if( t instanceof ParameterReferenceTuple ){ + if( !t.getParameterObject().getRef().isEmpty() ){ Parameter parameter = new Parameter(); - parameter.setRef(((ParameterReferenceTuple) t).getRef()); - parameters.put(((ParameterReferenceTuple) t).getName(), parameter); + parameter.setRef(t.getParameterObject().getRef()); + parameterMap.put(t.getKey(), parameter); } else - parameters.put(((ParameterObjectTuple)t).getName(), ParameterObject.composeParameter(((ParameterObjectTuple)t).getParameterObject())); + parameterMap.put(t.getKey(), ParameterObject.composeParameter(t.getParameterObject())); } - components.setParameters(parameters); + components.setParameters(parameterMap); } - if( componentsObject.getNumExamplesTuple() != 0 ){ - Map<String, Example> examples = new HashMap<>(); - for( ExamplesTuple t : componentsObject.getExamplesTuples() ) - examples.put(((ExampleObjectTuple)t).getName(), ExampleObject.composeExample(((ExampleObjectTuple)t).getExampleObject())); - components.setExamples(examples); - } - if( componentsObject.getNumRequestBodiesTuple() != 0 ){ - Map<String, org.openapi4j.parser.model.v3.RequestBody> requestBodies = new HashMap<>(); - for( RequestBodiesTuple t : componentsObject.getRequestBodiesTuples() ){ - if( t instanceof RequestBodyReferenceTuple ){ - org.openapi4j.parser.model.v3.RequestBody requestBody = new org.openapi4j.parser.model.v3.RequestBody(); - requestBody.setRef(((RequestBodyReferenceTuple) t).getRef()); - requestBodies.put(((RequestBodyReferenceTuple) t).getName(), requestBody); + if( componentsObject.getNumExampleTuple() != 0 ){ + Map<String, Example> exampleMap = new HashMap<>(); + for( ExampleTuple t : componentsObject.getExampleTuples() ) + exampleMap.put(t.getKey(), ExampleObject.composeExample(t.getExampleObject())); + components.setExamples(exampleMap); + } + if( componentsObject.getNumRequestBodyTuple() != 0 ){ + Map<String, RequestBody> requestBodyMap = new HashMap<>(); + for( RequestBodyTuple t : componentsObject.getRequestBodyTuples() ){ + if( !t.getRequestBodyObject().getRef().isEmpty() ){ + RequestBody requestBody = new RequestBody(); + requestBody.setRef(t.getRequestBodyObject().getRef()); + requestBodyMap.put(t.getKey(), requestBody); } else - requestBodies.put(((RequestBodyObjectTuple)t).getName(), RequestBodyObject.composeRequestBody(((RequestBodyObjectTuple)t).getRequestBodyObject())); + requestBodyMap.put(t.getKey(), RequestBodyObject.composeRequestBody(t.getRequestBodyObject())); } - components.setRequestBodies(requestBodies); + components.setRequestBodies(requestBodyMap); } - if( componentsObject.getNumHeadersTuple() != 0 ){ - Map<String, Header> headers = new HashMap<>(); - for( HeadersTuple t : componentsObject.getHeadersTuples() ){ - if( t instanceof HeaderReferenceTuple ){ + if( componentsObject.getNumHeaderTuple() != 0 ){ + Map<String, Header> headerMap = new HashMap<>(); + for( HeaderTuple t : componentsObject.getHeaderTuples() ){ + if( !t.getHeaderObject().getRef().isEmpty() ){ Header header = new Header(); - header.setRef(((HeaderReferenceTuple) t).getRef()); - headers.put(((HeaderReferenceTuple) t).getName(), header); + header.setRef(t.getHeaderObject().getRef()); + headerMap.put(t.getKey(), header); } else - headers.put(((HeaderObjectTuple)t).getName(), HeaderObject.composeHeader(((HeaderObjectTuple)t).getHeaderObject())); + headerMap.put(t.getKey(), HeaderObject.composeHeader(t.getHeaderObject())); } - components.setHeaders(headers); + components.setHeaders(headerMap); } - if( componentsObject.getNumSecuritySchemesTuple() != 0 ){ - Map<String, SecurityScheme> securitySchemes = new HashMap<>(); - for( SecuritySchemesTuple t : componentsObject.getSecuritySchemesTuples() ){ - if( t instanceof SecuritySchemeReferenceTuple ){ + if( componentsObject.getNumSecuritySchemeTuple() != 0 ){ + Map<String, SecurityScheme> securitySchemeMap = new HashMap<>(); + for( SecuritySchemeTuple t : componentsObject.getSecuritySchemeTuples() ){ + if( !t.getSecuritySchemeObject().getRef().isEmpty() ){ SecurityScheme securityScheme = new SecurityScheme(); - securityScheme.setRef(((SecuritySchemeReferenceTuple) t).getRef()); - securitySchemes.put(((SecuritySchemeReferenceTuple) t).getName(), securityScheme); + securityScheme.setRef(t.getSecuritySchemeObject().getRef()); + securitySchemeMap.put(t.getKey(), securityScheme); } else - securitySchemes.put(((SecuritySchemeObjectTuple)t).getName(), SecuritySchemeObject.composeSecurityScheme(((SecuritySchemeObjectTuple)t).getSecuritySchemeObject())); + securitySchemeMap.put(t.getKey(), SecuritySchemeObject.composeSecurityScheme(t.getSecuritySchemeObject())); } - components.setSecuritySchemes(securitySchemes); + components.setSecuritySchemes(securitySchemeMap); } - if( componentsObject.getNumLinksTuple() != 0 ){ - Map<String, Link> links = new HashMap<>(); - for( LinksTuple t : componentsObject.getLinksTuples() ){ - if( t instanceof LinkReferenceTuple ){ + if( componentsObject.getNumLinkTuple() != 0 ){ + Map<String, Link> linkMap = new HashMap<>(); + for( LinkTuple t : componentsObject.getLinkTuples() ){ + if( !t.getLinkObject().getRef().isEmpty() ){ Link link = new Link(); - link.setRef(((LinkReferenceTuple) t).getRef()); - links.put(((LinkReferenceTuple) t).getName(), link); + link.setRef(t.getLinkObject().getRef()); + linkMap.put(t.getKey(), link); } else - links.put(((LinkObjectTuple)t).getName(), LinkObject.composeLink(((LinkObjectTuple)t).getLinkObject())); + linkMap.put(t.getKey(), LinkObject.composeLink(t.getLinkObject())); } - components.setLinks(links); + components.setLinks(linkMap); } - if( componentsObject.getNumCallbacksTuple() != 0 ){ - Map<String, Callback> callbacks = new HashMap<>(); - for( CallbacksTuple t : componentsObject.getCallbacksTuples() ){ - if( t instanceof CallbackReferenceTuple ){ + if( componentsObject.getNumCallbackTuple() != 0 ){ + Map<String, Callback> callbackMap = new HashMap<>(); + for( CallbackTuple t : componentsObject.getCallbackTuples() ){ + if( !t.getCallbackObject().getRef().isEmpty() ){ Callback callback = new Callback(); - callback.setRef(((CallbackReferenceTuple) t).getRef()); - callbacks.put(((CallbackReferenceTuple) t).getName(), callback); + callback.setRef(t.getCallbackObject().getRef()); + callbackMap.put(t.getKey(), callback); } else - callbacks.put(((CallbackObjectTuple)t).getName(), CallbackObject.composeCallback(((CallbackObjectTuple)t).getCallbackObject())); + callbackMap.put(t.getKey(), CallbackObject.composeCallback(t.getCallbackObject())); } - components.setCallbacks(callbacks); + components.setCallbacks(callbackMap); } return components; } -public static Path PathItemObject.composePath (PathItemObject pathItemObject){ +public static Path PathItem.composePath (PathItem pathItem){ Path path = new Path(); - if( !pathItemObject.getSummary().isEmpty()) - path.setSummary(pathItemObject.getSummary()); - if( !pathItemObject.getDescription().isEmpty() ) - path.setDescription(pathItemObject.getDescription()); - if( pathItemObject.hasGet() ) - path.setGet( OperationObject.composeOperation(pathItemObject.getGet().getOperationObject()) ); - if( pathItemObject.hasPut() ) - path.setPut( OperationObject.composeOperation(pathItemObject.getPut().getOperationObject()) ); - if( pathItemObject.hasPost() ) - path.setPost( OperationObject.composeOperation(pathItemObject.getPost().getOperationObject()) ); - if( pathItemObject.hasDelete() ) - path.setDelete( OperationObject.composeOperation(pathItemObject.getDelete().getOperationObject()) ); - if( pathItemObject.hasOptions() ) - path.setOptions( OperationObject.composeOperation(pathItemObject.getOptions().getOperationObject()) ); - if( pathItemObject.hasHead() ) - path.setHead( OperationObject.composeOperation(pathItemObject.getHead().getOperationObject()) ); - if( pathItemObject.hasPatch() ) - path.setPatch( OperationObject.composeOperation(pathItemObject.getPatch().getOperationObject()) ); - if( pathItemObject.getNumServerObject() != 0 ){ - for( ServerObject s : pathItemObject.getServerObjects() ) + + if( !pathItem.getRef().isEmpty() ) + path.setRef(pathItem.getRef()); + if( !pathItem.getSummary().isEmpty()) + path.setSummary(pathItem.getSummary()); + if( !pathItem.getDescription().isEmpty() ) + path.setDescription(pathItem.getDescription()); + if( pathItem.hasGet() ) + path.setGet( OperationObject.composeOperation(pathItem.getGet().getOperationObject()) ); + if( pathItem.hasPut() ) + path.setPut( OperationObject.composeOperation(pathItem.getPut().getOperationObject()) ); + if( pathItem.hasPost() ) + path.setPost( OperationObject.composeOperation(pathItem.getPost().getOperationObject()) ); + if( pathItem.hasDelete() ) + path.setDelete( OperationObject.composeOperation(pathItem.getDelete().getOperationObject()) ); + if( pathItem.hasOptions() ) + path.setOptions( OperationObject.composeOperation(pathItem.getOptions().getOperationObject()) ); + if( pathItem.hasHead() ) + path.setHead( OperationObject.composeOperation(pathItem.getHead().getOperationObject()) ); + if( pathItem.hasPatch() ) + path.setPatch( OperationObject.composeOperation(pathItem.getPatch().getOperationObject()) ); + if( pathItem.getNumServerObject() != 0 ){ + for( ServerObject s : pathItem.getServerObjects() ) path.addServer( ServerObject.composeServer(s) ); } - if( pathItemObject.getNumParameterObject() != 0 ){ - for( ParameterObject p : pathItemObject.getParameterObjects() ) + if( pathItem.getNumParameterObject() != 0 ){ + for( ParameterObject p : pathItem.getParameterObjects() ) path.addParameter( ParameterObject.composeParameter(p) ); } @@ -284,8 +292,8 @@ public static Operation OperationObject.composeOperation (OperationObject operat operation.setSummary( operationObject.getSummary() ); if( !operationObject.getDescription().isEmpty() ) operation.setDescription( operationObject.getDescription() ); - if( operationObject.hasExternalDocumentationObject() ) - operation.setExternalDocs( ExternalDocumentationObject.composeExternalDocs(operationObject.getExternalDocumentationObject()) ); + if( operationObject.hasExternalDocObject() ) + operation.setExternalDocs( ExternalDocObject.composeExternalDocs(operationObject.getExternalDocObject()) ); if( !operationObject.getOperationID().isEmpty() ) operation.setOperationId( operationObject.getOperationID() ); if( operationObject.getNumParameterObject() != 0 ){ @@ -294,27 +302,27 @@ public static Operation OperationObject.composeOperation (OperationObject operat } if( operationObject.hasRequestBodyObject() ) operation.setRequestBody( RequestBodyObject.composeRequestBody(operationObject.getRequestBodyObject())); - if( operationObject.getResponsesObject().getNumHTTPStatusCode() != 0){ - Map<String, Response> responses = new HashMap<>(); - for( HTTPStatusCode h : operationObject.getResponsesObject().getHTTPStatusCodes() ) - responses.put( ((ResponseObject)h).getName(), ResponseObject.composeResponse( ((ResponseObject) h)) ); - operation.setResponses(responses); + if( operationObject.getNumResponseTuple() != 0){ + Map<String, Response> responseMap = new HashMap<>(); + for( ResponseTuple t : operationObject.getResponseTuples() ) + responseMap.put(t.getKey(), ResponseObject.composeResponse(t.getResponseObject())); + operation.setResponses(responseMap); } - if( operationObject.getNumCallbacksTuple() != 0 ){ + if( operationObject.getNumCallbackTuple() != 0 ){ Map<String, Callback> callbacks = new HashMap<>(); - for( CallbacksTuple t : operationObject.getCallbacksTuples() ) { - if( t instanceof CallbackReferenceTuple ){ + for( CallbackTuple t : operationObject.getCallbackTuples() ) { + if( !t.getCallbackObject().getRef().isEmpty() ){ Callback callback = new Callback(); - callback.setRef(((CallbackReferenceTuple) t).getRef()); - callbacks.put(((CallbackReferenceTuple) t).getName(), callback); + callback.setRef(t.getCallbackObject().getRef()); + callbacks.put(t.getKey(), callback); } else - callbacks.put(((CallbackObjectTuple)t).getName(), CallbackObject.composeCallback(((CallbackObjectTuple)t).getCallbackObject())); - } + callbacks.put(t.getKey(), CallbackObject.composeCallback(t.getCallbackObject())); operation.setCallbacks(callbacks); } + } if( operationObject.getDeprecatedBoolean() != null ) - operation.setDeprecated(operationObject.getDeprecatedBoolean().getDeprecatedBoolean()); + operation.setDeprecated(operationObject.getDeprecatedBoolean()); if( operationObject.getNumSecurityRequirementObject() != 0 ){ for( SecurityRequirementObject s : operationObject.getSecurityRequirementObjects() ) operation.addSecurityRequirement( SecurityRequirementObject.composeSecurityRequirement(s) ); @@ -327,12 +335,19 @@ public static Operation OperationObject.composeOperation (OperationObject operat return operation; } -public static ExternalDocs ExternalDocumentationObject.composeExternalDocs (ExternalDocumentationObject externalDocumentationObject){ +public static ExternalDocs ExternalDocObject.composeExternalDocs (ExternalDocObject externalDocObject){ ExternalDocs externalDocs = new ExternalDocs(); - if( !externalDocumentationObject.getDescription().isEmpty() ) - externalDocs.getDescription(); - externalDocs.setUrl( externalDocumentationObject.getUrl() ); + if( !externalDocObject.getDescription().isEmpty() ) + externalDocs.setDescription(externalDocObject.getDescription()); + if( !externalDocObject.getUrl().isEmpty() ) + externalDocs.setUrl(externalDocObject.getUrl()); + if( externalDocObject.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : externalDocObject.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + externalDocs.setExtensions(extensionMap); + } return externalDocs; } @@ -340,59 +355,61 @@ public static ExternalDocs ExternalDocumentationObject.composeExternalDocs (Exte public static Parameter ParameterObject.composeParameter (ParameterObject parameterObject){ Parameter parameter = new Parameter(); - parameter.setName( parameterObject.getName() ); - parameter.setIn( parameterObject.getIn() ); - parameter.setRequired( parameterObject.getRequired() ); - + if( !parameterObject.getRef().isEmpty() ) + parameter.setRef(parameterObject.getRef()); + if( !parameterObject.getName().isEmpty() ) + parameter.setName(parameterObject.getName()); + if( !parameterObject.getIn().isEmpty() ) + parameter.setIn(parameterObject.getIn()); + if( parameterObject.getRequired() != null ) + parameter.setRequired(parameterObject.getRequired()); if( !parameterObject.getDescription().isEmpty() ) - parameter.setDescription( parameterObject.getDescription() ); + parameter.setDescription(parameterObject.getDescription()); if( parameterObject.getDeprecatedBoolean() != null ) - parameter.setDeprecated( parameterObject.getDeprecatedBoolean() ); - if( parameterObject.getStyle() != null ) - parameter.setStyle( parameter.getStyle() ); + parameter.setDeprecated(parameterObject.getDeprecatedBoolean()); + if( !parameterObject.getStyle().isEmpty() ) + parameter.setStyle(parameterObject.getStyle()); if( parameterObject.getAllowReserved() != null ) - parameter.setAllowReserved( parameterObject.getAllowReserved() ); + parameter.setAllowReserved(parameterObject.getAllowReserved()); if( parameterObject.getExplode() != null ) - parameter.setExplode( parameterObject.getExplode() ); - if( parameterObject.getAllowReserved() != null ) - parameter.setAllowReserved( parameterObject.getAllowReserved() ); - if( parameterObject.getSchemaObject() != null ){ - Schema schema = new Schema(); - schema = SchemaObject.composeSchema(parameterObject.getSchemaObject()); - if( !parameterObject.getRef().isEmpty() ) - schema.setRef(parameterObject.getRef()); - parameter.setSchema(schema);} + parameter.setExplode(parameterObject.getExplode()); + if( parameterObject.getSchemaObject() != null ) + parameter.setSchema(SchemaObject.composeSchema(parameterObject.getSchemaObject())); if( parameterObject.getExample() != null ) - parameter.setExample( parameterObject.getExample() ); - if( parameterObject.getNumExamplesTuple() != 0 ){ - Map<String, Example> examples = new HashMap<>(); - for( ExamplesTuple t : parameterObject.getExamplesTuples() ) - examples.put( ((ExampleObjectTuple)t).getName(), ExampleObject.composeExample( ((ExampleObjectTuple)t).getExampleObject() ) ); - parameter.setExamples(examples); + parameter.setExample(parameterObject.getExample()); + if( parameterObject.getNumExampleTuple() != 0 ){ + Map<String, Example> exampleMap = new HashMap<>(); + for( ExampleTuple t : parameterObject.getExampleTuples() ) + exampleMap.put(t.getKey(), ExampleObject.composeExample(t.getExampleObject())); + parameter.setExamples(exampleMap); } if( parameterObject.getNumContentTuple() != 0 ){ - Map<String, MediaType> contents = new HashMap<>(); + Map<String, MediaType> contentMap = new HashMap<>(); for( ContentTuple t : parameterObject.getContentTuples() ) - contents.put( ((ContentObjectTuple)t).getName(), MediaTypeObject.composeMediaType( ((ContentObjectTuple)t).getMediaTypeObject() ) ); - parameter.setContentMediaTypes(contents); + contentMap.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); + parameter.setContentMediaTypes(contentMap); } + if( parameterObject.getRequired() != null ) + parameter.setRequired(parameterObject.getRequired()); return parameter; } public static org.openapi4j.parser.model.v3.RequestBody RequestBodyObject.composeRequestBody (RequestBodyObject requestBodyObject){ org.openapi4j.parser.model.v3.RequestBody requestBody = new org.openapi4j.parser.model.v3.RequestBody(); - Map<String, MediaType> contents = new HashMap<>(); - for( ContentTuple t : requestBodyObject.getContentTuples() ) - contents.put( ((ContentObjectTuple)t).getName(), MediaTypeObject.composeMediaType( ((ContentObjectTuple)t).getMediaTypeObject() ) ); + if( requestBodyObject.getNumContentTuple() != 0 ){ + Map<String, MediaType> contents = new HashMap<>(); + for( ContentTuple t : requestBodyObject.getContentTuples()) + contents.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); requestBody.setContentMediaTypes(contents); + } if( !requestBodyObject.getDescription().isEmpty() ) requestBody.setDescription(requestBodyObject.getDescription()); if( requestBodyObject.getRequired() != null ) requestBody.setRequired(requestBodyObject.getRequired()); if( !requestBodyObject.getRef().isEmpty() ) - requestBody.setRef(requestBodyObject.getRef()); + requestBody.setRef(requestBodyObject.getRef()); return requestBody; } @@ -400,24 +417,21 @@ public static org.openapi4j.parser.model.v3.RequestBody RequestBodyObject.compos public static MediaType MediaTypeObject.composeMediaType (MediaTypeObject mediaTypeObject){ MediaType mediaType = new MediaType(); - if( mediaTypeObject.getSchemaObject() != null ) { - Schema schema = new Schema(); - schema = SchemaObject.composeSchema(mediaTypeObject.getSchemaObject()); - mediaType.setSchema(schema); - } + if( mediaTypeObject.getSchemaObject() != null ) + mediaType.setSchema(SchemaObject.composeSchema(mediaTypeObject.getSchemaObject())); if( mediaTypeObject.getExample() != null ) - mediaType.setExample( mediaTypeObject.getExample() ); - if( mediaTypeObject.getNumExamplesTuple() != 0 ){ - Map<String, Example> examples = new HashMap<>(); - for( ExamplesTuple t : mediaTypeObject.getExamplesTuples() ) - examples.put( ((ExampleObjectTuple)t).getName(), ExampleObject.composeExample( ((ExampleObjectTuple)t).getExampleObject() ) ); - mediaType.setExamples(examples); + mediaType.setExample(mediaTypeObject.getExample()); + if( mediaTypeObject.getNumExampleTuple() != 0 ){ + Map<String, Example> exampleMap = new HashMap<>(); + for( ExampleTuple t : mediaTypeObject.getExampleTuples() ) + exampleMap.put(t.getKey(), ExampleObject.composeExample(t.getExampleObject())); + mediaType.setExamples(exampleMap); } if( mediaTypeObject.getNumEncodingTuple() != 0 ){ - Map<String, EncodingProperty> encodings = new HashMap<>(); + Map<String, EncodingProperty> encodingMap = new HashMap<>(); for( EncodingTuple t : mediaTypeObject.getEncodingTuples() ) - encodings.put( ((EncodingObjectTuple)t).getName(), EncodingObject.composeEncodingProperty( ((EncodingObjectTuple)t).getEncodingObject() ) ); - mediaType.setEncodings(encodings); + encodingMap.put(t.getKey(), EncodingObject.composeEncodingProperty(t.getEncodingObject())); + mediaType.setEncodings(encodingMap); } return mediaType; @@ -426,18 +440,24 @@ public static MediaType MediaTypeObject.composeMediaType (MediaTypeObject mediaT public static EncodingProperty EncodingObject.composeEncodingProperty (EncodingObject encodingObject){ EncodingProperty encodingProperty = new EncodingProperty(); - if( encodingObject.getContentType() != null ) + if( !encodingObject.getContentType().isEmpty() ) encodingProperty.setContentType( encodingObject.getContentType() ); - if( encodingObject.getNumHeadersTuple() != 0 ){ + if( encodingObject.getNumHeaderTuple() != 0 ){ Map<String, Header> headers = new HashMap<>(); - for( HeadersTuple t : encodingObject.getHeadersTuples() ) - headers.put( ((HeaderObjectTuple)t).getName(), HeaderObject.composeHeader( ((HeaderObjectTuple)t).getHeaderObject() ) ); + for( HeaderTuple t : encodingObject.getHeaderTuples() ) + headers.put(t.getKey(), HeaderObject.composeHeader(t.getHeaderObject())); encodingProperty.setHeaders(headers); } - if( encodingObject.getStyle() != null ) + if( !encodingObject.getStyle().isEmpty() ) encodingProperty.setStyle(encodingObject.getStyle()); if( encodingObject.getExplode() != null ) - encodingProperty.setExplode( (boolean) encodingObject.getExplode() ); + encodingProperty.setExplode(encodingObject.getExplode()); + if( encodingObject.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : encodingObject.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + encodingProperty.setExtensions(extensionMap); + } return encodingProperty; } @@ -445,24 +465,27 @@ public static EncodingProperty EncodingObject.composeEncodingProperty (EncodingO public static Response ResponseObject.composeResponse (ResponseObject responseObject){ Response response = new Response(); - response.setDescription( responseObject.getDescription() ); - - if( responseObject.getNumHeadersTuple() != 0 ){ + if( !responseObject.getRef().isEmpty() ) + response.setRef(responseObject.getRef()); + if( !responseObject.getDescription().isEmpty() ) + response.setDescription(responseObject.getDescription()); + if( responseObject.getNumHeaderTuple() != 0 ){ Map<String, Header> headers = new HashMap<>(); - for( HeadersTuple t : responseObject.getHeadersTuples() ) - headers.put( ((HeaderObjectTuple)t).getName(), HeaderObject.composeHeader( ((HeaderObjectTuple)t).getHeaderObject() ) ); + for( HeaderTuple t : responseObject.getHeaderTuples() ) + headers.put(t.getKey(), HeaderObject.composeHeader(t.getHeaderObject())); response.setHeaders(headers); } if( responseObject.getNumContentTuple() != 0 ){ Map<String, MediaType> contents = new HashMap<>(); for( ContentTuple t : responseObject.getContentTuples() ) - contents.put( ((ContentObjectTuple)t).getName(), MediaTypeObject.composeMediaType( ((ContentObjectTuple)t).getMediaTypeObject() ) ); + contents.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); response.setContentMediaTypes(contents); } - if( responseObject.getNumLinksTuple() != 0 ){ + if( responseObject.getNumLinkTuple() != 0 ){ Map<String, Link> links = new HashMap<>(); - for( LinksTuple t : responseObject.getLinksTuples() ) - links.put( ((LinkObjectTuple)t).getName(), LinkObject.composeLink( ((LinkObjectTuple)t).getLinkObject() ) ); + for( LinkTuple t : responseObject.getLinkTuples() ) + links.put(t.getKey(), LinkObject.composeLink(t.getLinkObject())); + response.setLinks(links); } return response; @@ -474,7 +497,7 @@ public static Callback CallbackObject.composeCallback (CallbackObject callbackOb if( callbackObject.getNumExpression() != 0 ){ Map<String, Path> paths = new HashMap<>(); for( Expression e : callbackObject.getExpressions() ) - paths.put( e.getName(), PathItemObject.composePath( e.getPathItemObject() )); + paths.put( e.getName(), PathItem.composePath( e.getPathItem() )); callback.setCallbackPaths(paths); } @@ -499,9 +522,11 @@ public static Example ExampleObject.composeExample (ExampleObject exampleObject) public static Link LinkObject.composeLink (LinkObject linkObject){ Link link = new Link(); - if( linkObject.getOperationRef().isEmpty() ) + if( !linkObject.getRef().isEmpty() ) + link.setRef(linkObject.getRef()); + if( !linkObject.getOperationRef().isEmpty() ) link.setOperationRef( linkObject.getOperationRef() ); - if( linkObject.getOperationID().isEmpty() ) + if( !linkObject.getOperationID().isEmpty() ) link.setOperationId( linkObject.getOperationID() ); if( linkObject.getNumLinkParameterTuple() != 0 ){ Map<String, String> parameters = new HashMap<>(); @@ -524,26 +549,28 @@ public static Header HeaderObject.composeHeader (HeaderObject headerObject){ if( !headerObject.getDescription().isEmpty() ) header.setDescription( headerObject.getDescription() ); - if( headerObject.getStyle() != null ) + if( !headerObject.getStyle().isEmpty() ) header.setStyle(headerObject.getStyle()); if( headerObject.getExplode() != null ) - header.setExplode((boolean)headerObject.getExplode()); + header.setExplode(headerObject.getExplode()); if( headerObject.getAllowReserved() != null ) - header.setAllowReserved((boolean)headerObject.getAllowReserved()); + header.setAllowReserved(headerObject.getAllowReserved()); if( headerObject.getExample() != null ) header.setExample(headerObject.getExample()); - if( headerObject.getNumExamplesTuple() != 0 ){ + if( headerObject.getNumExampleTuple() != 0 ){ Map<String, Example> examples = new HashMap<>(); - for( ExamplesTuple t : headerObject.getExamplesTuples() ) - examples.put( ((ExampleObjectTuple)t).getName(), ExampleObject.composeExample( ((ExampleObjectTuple)t).getExampleObject() ) ); + for( ExampleTuple t : headerObject.getExampleTuples() ) + examples.put(t.getKey(), ExampleObject.composeExample(t.getExampleObject())); header.setExample(examples); } if( headerObject.getNumContentTuple() != 0 ){ Map<String, MediaType> contents = new HashMap<>(); for( ContentTuple t : headerObject.getContentTuples() ) - contents.put( ((ContentObjectTuple)t).getName(), MediaTypeObject.composeMediaType( ((ContentObjectTuple)t).getMediaTypeObject() ) ); + contents.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); header.setContentMediaTypes(contents); } + if( headerObject.hasSchemaObject() ) + header.setSchema(SchemaObject.composeSchema(headerObject.getSchemaObject())); return header; } @@ -555,8 +582,8 @@ public static org.openapi4j.parser.model.v3.Tag TagObject.composeTag (TagObject if( !tagObject.getDescription().isEmpty() ) tag.setDescription( tagObject.getDescription() ); - if( tagObject.hasExternalDocumentationObject() ) - tag.setExternalDocs( ExternalDocumentationObject.composeExternalDocs(tagObject.getExternalDocumentationObject()) ); + if( tagObject.hasExternalDocObject() ) + tag.setExternalDocs( ExternalDocObject.composeExternalDocs(tagObject.getExternalDocObject()) ); return tag; } @@ -564,52 +591,58 @@ public static org.openapi4j.parser.model.v3.Tag TagObject.composeTag (TagObject public static org.openapi4j.parser.model.v3.Schema SchemaObject.composeSchema (SchemaObject schemaObject) { org.openapi4j.parser.model.v3.Schema schema = new org.openapi4j.parser.model.v3.Schema(); - if( schemaObject.hasAdditionalProperties() ) - schema.setAdditionalProperties(composeSchema(schemaObject.getAdditionalProperties().getSchemaObject())); - if( schemaObject.getAdditionalPropertiesAllowed() != null ) - schema.setAdditionalPropertiesAllowed((boolean)schemaObject.getAdditionalPropertiesAllowed()); + if( !schemaObject.getRef().isEmpty() ) + schema.setRef(schemaObject.getRef()); + if( schemaObject.getAdditionalProperties() != null ) + schema.setAdditionalProperties(composeSchema(schemaObject.getAdditionalProperties())); + //if( schemaObject.getAdditionalPropertiesAllowed() != null ) + //schema.setAdditionalPropertiesAllowed(schemaObject.getAdditionalPropertiesAllowed()); if( schemaObject.getDefaultValue() != null ) schema.setDefault(schemaObject.getDefaultValue()); if( !schemaObject.getDescription().isEmpty() ) schema.setDescription(schemaObject.getDescription()); if( schemaObject.getDeprecatedBoolean() != null ) - schema.setDeprecated((boolean)schemaObject.getDeprecatedBoolean()); + schema.setDeprecated(schemaObject.getDeprecatedBoolean()); if( schemaObject.hasDiscriminatorObject() ) schema.setDiscriminator(DiscriminatorObject.composeDiscriminator(schemaObject.getDiscriminatorObject())); + if( schemaObject.getNumEnumObj() != 0 ){ + for( EnumObj e : schemaObject.getEnumObjs() ) + schema.addEnum(e.getEnumOb()); + } if( schemaObject.getExample() != null ) schema.setExample(schemaObject.getExample()); if( schemaObject.getExclusiveMaximum() != null ) - schema.setExclusiveMaximum((boolean)schemaObject.getExclusiveMaximum()); + schema.setExclusiveMaximum(schemaObject.getExclusiveMaximum()); if( schemaObject.getExclusiveMinimum() != null ) - schema.setExclusiveMinimum((boolean)schemaObject.getExclusiveMinimum()); - if( schemaObject.hasExternalDocumentationObject() ) - schema.setExternalDocs(ExternalDocumentationObject.composeExternalDocs(schemaObject.getExternalDocumentationObject())); + schema.setExclusiveMinimum(schemaObject.getExclusiveMinimum()); + if( schemaObject.hasExternalDocObject() ) + schema.setExternalDocs(ExternalDocObject.composeExternalDocs(schemaObject.getExternalDocObject())); if( !schemaObject.getFormat().isEmpty() ) schema.setFormat(schemaObject.getFormat()); if( schemaObject.hasItemsSchema() ) schema.setItemsSchema(composeSchema(schemaObject.getItemsSchema().getSchemaObject())); if( schemaObject.getMaximum() != null ) - schema.setMaximum((Number) schemaObject.getMaximum()); + schema.setMaximum(schemaObject.getMaximum()); if( schemaObject.getMinimum() != null ) - schema.setMinimum((Number) schemaObject.getMinimum()); + schema.setMinimum(schemaObject.getMinimum()); if( schemaObject.getMaxItems() != null ) - schema.setMaxItems((Integer) schemaObject.getMaxItems()); + schema.setMaxItems(schemaObject.getMaxItems()); if( schemaObject.getMinItems() != null ) - schema.setMinItems((Integer) schemaObject.getMinItems()); + schema.setMinItems(schemaObject.getMinItems()); if( schemaObject.getMaxLength() != null ) - schema.setMaxLength((Integer) schemaObject.getMaxLength()); + schema.setMaxLength(schemaObject.getMaxLength()); if( schemaObject.getMinLength() != null ) - schema.setMinLength((Integer) schemaObject.getMinLength()); + schema.setMinLength(schemaObject.getMinLength()); if( schemaObject.getMaxProperties() != null ) - schema.setMaxProperties((Integer) schemaObject.getMaxProperties()); + schema.setMaxProperties(schemaObject.getMaxProperties()); if( schemaObject.getMinProperties() != null ) - schema.setMinProperties((Integer) schemaObject.getMinProperties()); + schema.setMinProperties(schemaObject.getMinProperties()); if( schemaObject.getMultipleOf() != null ) - schema.setMultipleOf((Number) schemaObject.getMultipleOf()); + schema.setMultipleOf(schemaObject.getMultipleOf()); if( schemaObject.hasNotSchema() ) schema.setNotSchema(composeSchema(schemaObject.getNotSchema().getSchemaObject())); if( schemaObject.getNullable() != null ) - schema.setNullable((boolean) schemaObject.getNullable()); + schema.setNullable(schemaObject.getNullable()); if( !schemaObject.getPattern().isEmpty() ) schema.setPattern(schemaObject.getPattern()); if( schemaObject.getNumPropertyItem() != 0 ){ @@ -635,15 +668,15 @@ public static org.openapi4j.parser.model.v3.Schema SchemaObject.composeSchema (S schema.addOneOfSchema(composeSchema(o.getSchemaObject())); } if( schemaObject.getReadOnly() != null ) - schema.setReadOnly((boolean) schemaObject.getReadOnly()); + schema.setReadOnly(schemaObject.getReadOnly()); if( schemaObject.getWriteOnly() != null ) - schema.setWriteOnly((boolean) schemaObject.getWriteOnly()); + schema.setWriteOnly(schemaObject.getWriteOnly()); if( !schemaObject.getType().isEmpty() ) schema.setType(schemaObject.getType()); if( !schemaObject.getTitle().isEmpty() ) schema.setTitle(schemaObject.getTitle()); if( schemaObject.getUniqueItems() != null ) - schema.setUniqueItems((boolean) schemaObject.getUniqueItems()); + schema.setUniqueItems(schemaObject.getUniqueItems()); if( schemaObject.hasXmlObject() ) schema.setXml(XmlObject.composeXml(schemaObject.getXmlObject())); @@ -690,7 +723,7 @@ public static SecurityScheme SecuritySchemeObject.composeSecurityScheme (Securit securityScheme.setIn( securitySchemeObject.getIn() ); securityScheme.setScheme( securitySchemeObject.getScheme() ); securityScheme.setOpenIdConnectUrl( securitySchemeObject.getOpenIdConnectUrl() ); - securityScheme.setFlows( OAuthFlowsObject.composeOAuthFlows( securitySchemeObject.getFlows().getOAuthFlowsObject() ) ); + securityScheme.setFlows( OAuthFlowsObject.composeOAuthFlows( securitySchemeObject.getOAuthFlowsObject() ) ); if( !securitySchemeObject.getDescription().isEmpty() ) securityScheme.setDescription( securitySchemeObject.getDescription() ); diff --git a/src/main/jastadd/OpenAPISpecification.ast b/src/main/jastadd/OpenAPISpecification.ast index 83617c1033f7dbd5151a4c3b4d46e78a57a20b89..c538de3dcff08b53d274d8b7f06fc56056fdba26 100644 --- a/src/main/jastadd/OpenAPISpecification.ast +++ b/src/main/jastadd/OpenAPISpecification.ast @@ -1,24 +1,17 @@ //OpenAPI Object -OpenAPIObject ::= <OpenAPI> InfoObject ServerObject* PathsObject* [ComponentsObject] SecurityRequirementObject* TagObject* [ExternalDocumentationObject]; -PathsObject ::= <Ref> PathItemObject; -ServerObject ::= <Url> <Description> ServerVariablesTuple*; -ComponentsObject ::= SchemasTuple* ResponsesTuple* ParameterTuple* ExamplesTuple* RequestBodiesTuple* HeadersTuple* SecuritySchemesTuple* LinksTuple* CallbacksTuple*; -SecurityRequirementObject ::= SecurityRequirementTuple*; -ExternalDocumentationObject ::= <Description> <Url>; +OpenAPIObject ::= <OpenAPI> [InfoObject] ServerObject* PathsObject* [ComponentsObject] SecurityRequirementObject* TagObject* [ExternalDocObject] <Context:OAIContext>; //Info Object InfoObject ::= <Title> <Description> <TermsOfService> [ContactObject] [LicenseObject] <Version>; -ContactObject ::= <Name> <Url> <Email>; -LicenseObject ::= <Name> <Url>; //Contact Object -//ContactObject ::= <Name> <Url> <Email>; +ContactObject ::= <Name> <Url> <Email>; //License Object -//LicenseObject ::= <Name> <Url>; +LicenseObject ::= <Name> <Url>; //Server Object -//ServerObject ::= <Url> <Description> ServerVariablesTuple*; +ServerObject ::= <Url> <Description> ServerVariablesTuple*; ServerVariablesTuple ::= <Name> ServerVariableObject; //Server Variable Object @@ -26,41 +19,23 @@ ServerVariableObject ::= Enum* <Default> <Description>; Enum ::= <EnumValue>; //Components Object -//ComponentsObject ::= SchemasTuple* ResponsesTuple* ParameterTuple* ExamplesTuple* RequestBodiesTuple* HeadersTuple* SecuritySchemesTuple* LinksTuple* CallbacksTuple*; -abstract SchemasTuple; -SchemaObjectTuple:SchemasTuple ::= <Name> SchemaObject; -SchemaReferenceTuple:SchemasTuple ::= <Name> <Ref>; -abstract ResponsesTuple; -ResponseObjectTuple:ResponsesTuple ::= <Name> ResponseObject; -ResponseReferenceTuple:ResponsesTuple ::= <Name> <Ref>; -abstract ParameterTuple; -ParameterObjectTuple:ParameterTuple ::= <Name> ParameterObject; -ParameterReferenceTuple:ParameterTuple ::= <Name> <Ref>; -abstract ExamplesTuple; -ExampleObjectTuple:ExamplesTuple ::= <Name> ExampleObject; -ExampleReferenceTuple:ExamplesTuple ::= <Name> <Ref>; -abstract RequestBodiesTuple; -RequestBodyObjectTuple:RequestBodiesTuple ::= <Name> RequestBodyObject; -RequestBodyReferenceTuple:RequestBodiesTuple ::= <Name> <Ref>; -abstract HeadersTuple; -HeaderObjectTuple:HeadersTuple ::= <Name> HeaderObject; -HeaderReferenceTuple:HeadersTuple ::= <Name> <Ref>; -abstract SecuritySchemesTuple; -SecuritySchemeObjectTuple:SecuritySchemesTuple ::= <Name> SecuritySchemeObject; -SecuritySchemeReferenceTuple:SecuritySchemesTuple ::= <Name> <Ref>; -abstract LinksTuple; -LinkObjectTuple:LinksTuple ::= <Name> LinkObject; -LinkReferenceTuple:LinksTuple ::= <Name> <Ref>; -abstract CallbacksTuple; -CallbackObjectTuple:CallbacksTuple ::= <Name> CallbackObject; -CallbackReferenceTuple:CallbacksTuple ::= <Name> <Ref>; +ComponentsObject ::= SchemaTuple* ResponseTuple* ParameterTuple* ExampleTuple* RequestBodyTuple* HeaderTuple* SecuritySchemeTuple* LinkTuple* CallbackTuple*; +SchemaTuple ::= <Key> SchemaObject; +ResponseTuple ::= <Key> ResponseObject; +ParameterTuple ::= <Key> ParameterObject; +ExampleTuple ::= <Key> ExampleObject; +RequestBodyTuple ::= <Key> RequestBodyObject; +HeaderTuple ::= <Key> HeaderObject; +SecuritySchemeTuple ::= <Key> SecuritySchemeObject; +LinkTuple ::= <Key> LinkObject; +CallbackTuple ::= <Key> CallbackObject; + //Paths Object -//PathsObject ::= <Ref> PathItemObject; -PathItemObject ::= <Ref> <Summary> <Description> [Get] [Put] [Post] [Delete] [Options] [Head] [Patch] [Trace] ServerObject* ParameterObject*; +PathsObject ::= <Ref> PathItem; //Path Item Object -//PathItemObject ::= <Summary> <Description> [Get] [Put] [Post] [Delete] [Options] [Head] [Patch] [Trace] Server* Parameter*; +PathItem ::= <Ref> <Summary> <Description> [Get] [Put] [Post] [Delete] [Options] [Head] [Patch] [Trace] ServerObject* ParameterObject*; Get ::= OperationObject; Put ::= OperationObject; Post ::= OperationObject; @@ -69,64 +44,51 @@ Options ::= OperationObject; Head ::= OperationObject; Patch ::= OperationObject; Trace ::= OperationObject; -ParameterObject ::= <Name> <In> <Description> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExamplesTuple* ContentTuple* <Ref>; //Operation Object -OperationObject ::= Tag* <Summary> <Description> [ExternalDocumentationObject] <OperationID> ParameterObject* [RequestBodyObject] ResponsesObject CallbacksTuple* [DeprecatedBoolean] SecurityRequirementObject* ServerObject*; +OperationObject ::= Tag* <Summary> <Description> [ExternalDocObject] <OperationID> ParameterObject* [RequestBodyObject] ResponseTuple* CallbackTuple* <DeprecatedBoolean:Boolean> SecurityRequirementObject* ServerObject* <Required:Boolean>; Tag ::= <Tag:String>; -RequestBodyObject ::= <Description> ContentTuple* <Required:Boolean> <Ref>; -DeprecatedBoolean ::= <DeprecatedBoolean:Boolean>; //External Documentation Object -//ExternalDocumentationObject ::= <Description:Object> <Url>; +ExternalDocObject ::= <Description> <Url> Extension*; //Parameter Object -//ParameterObject ::= Name In <Description:Object> <Required> [Deprecated] <AllowEmptyValue:Object> <Style:Object> <Explode:Object> <AllowReserved:Object> [Schema] <Example:Object> ExamplesTuple* ContentTuple*; -SchemaObject ::= [AdditionalProperties] <AdditionalPropertiesAllowed:Object> <DefaultValue:Object> <Description> <DeprecatedBoolean:Object> [DiscriminatorObject] EnumObj* <Example:Object> <ExclusiveMaximum:Object> <ExclusiveMinimum:Object> [ExternalDocumentationObject] <Format> [ItemsSchema] <Maximum:Object> <Minimum:Object> <MaxItems:Object> <MinItems:Object> <MaxLength:Object> <MinLength:Object> <MaxProperties:Object> <MinProperties:Object> <MultipleOf:Object> [NotSchema] <Nullable:Object> <Pattern> PropertyItem* RequiredField* AllOfSchema* AnyOfSchema* OneOfSchema* <ReadOnly:Object> <WriteOnly:Object> <Type> <Title> <UniqueItems:Object> [XmlObject] <Ref>; -abstract ContentTuple; -ContentObjectTuple:ContentTuple ::= <Name> MediaTypeObject; -ContentReferenceTuple:ContentTuple ::= <Name> <Ref>; +ParameterObject ::= <Name> <In> <Description> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExampleTuple* ContentTuple* <Ref>; +ContentTuple ::= <Key> MediaTypeObject; //Request Body Object -//RequestBodyObject ::= <Description:Object> ContentTuple* <Required:Object>; +RequestBodyObject ::= <Description> ContentTuple* <Required:Boolean> <Ref>; //Media Type Object -MediaTypeObject ::= [SchemaObject] <Example:Object> ExamplesTuple* EncodingTuple*; -abstract EncodingTuple; -EncodingObjectTuple:EncodingTuple ::= <Name> EncodingObject; -EncodingReferenceTuple:EncodingTuple ::= <Name> <Ref>; +MediaTypeObject ::= [SchemaObject] <Example:Object> ExampleTuple* EncodingTuple*; +EncodingTuple ::= <Key> EncodingObject; //Encoding Object -EncodingObject ::= <ContentType> HeadersTuple* <Style> <Explode:Object> <AllowReserved:Object>; - -//Responses Object -ResponsesObject ::= HTTPStatusCode*; -abstract HTTPStatusCode; -ResponseObject:HTTPStatusCode ::= <Name> <Description> HeadersTuple* ContentTuple* LinksTuple*; -HTTPStatusCodeReference:HTTPStatusCode ::= <Name> <Ref>; +EncodingObject ::= <ContentType> HeaderTuple* <Style> <Explode:Boolean> <AllowReserved:Boolean> Extension*; //Response Object -//ResponseObject ::= <Name> <Description> HeadersTuple* ContentTuple* LinksTuple*; +ResponseObject ::= <Ref> <Description> HeaderTuple* ContentTuple* LinkTuple*; //Callback Object -CallbackObject ::= Expression*; -Expression ::= <Name> PathItemObject; +CallbackObject ::= Expression* Extension* <Ref>; +Expression ::= <Name> PathItem; +Extension ::= <Key> <Value:Object>; //Example Object ExampleObject ::= <Summary> <Description> <Value:Object> <ExternalValue>; //Link Object -LinkObject ::= <OperationRef> <OperationID> LinkParameterTuple* <LinkRequestBody:Object> <Description> [ServerObject]; +LinkObject ::= <OperationRef> <OperationID> LinkParameterTuple* HeaderTuple* <Description> [ServerObject] <Ref>; LinkParameterTuple ::= <LinkParameterKey> <LinkParameterValue>; //Header Object -HeaderObject ::= <Description> <Required:boolean> <DeprecatedBoolean:Object> <AllowEmptyValue:Object> <Style> <Explode:Object> <AllowReserved:Object> [SchemaObject] <Example:Object> ExamplesTuple* ContentTuple*; +HeaderObject ::= <Description> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExampleTuple* ContentTuple* <Ref>; //Tag Object -TagObject ::= <Name> <Description> [ExternalDocumentationObject]; +TagObject ::= <Name> <Description> [ExternalDocObject]; //Schema Object -//SchemaObject ::= [AdditionalProperties] <AdditionalPropertiesAllowed:Object> <DefaultValue:Object> <Description> <DeprecatedBoolean:Object> [DiscriminatorObject] EnumObj* <Example:Object> <ExclusiveMaximum:Object> <ExclusiveMinimum:Object> [ExternalDocumentationObject] <Format> [ItemsSchema] <Maximum:Object> <Minimum:Object> <MaxItems:Object> <MinItems:Object> <MaxLength:Object> <MinLength:Object> <MaxProperties:Object> <MinProperties:Object> <MultipleOf:Object> [NotSchema] <Nullable:Object> <Pattern> PropertyItem* RequiredField* AllOfSchema* AnyOfSchema* OneOfSchema* <ReadOnly:Object> <WriteOnly:Object> <Type> <Title> <UniqueItems:Object> [XmlObject]; +SchemaObject ::= <AdditionalProperties:SchemaObject> <AdditionalPropertiesAllowed:Boolean> <DefaultValue:Object> <Description> <DeprecatedBoolean:Boolean> [DiscriminatorObject] EnumObj* <Example:Object> <ExclusiveMaximum:Boolean> <ExclusiveMinimum:Boolean> [ExternalDocObject] <Format> [ItemsSchema] <Maximum:Number> <Minimum:Number> <MaxItems:Integer> <MinItems:Integer> <MaxLength:Integer> <MinLength:Integer> <MaxProperties:Integer> <MinProperties:Integer> <MultipleOf:Number> [NotSchema] <Nullable:Boolean> <Pattern> PropertyItem* RequiredField* AllOfSchema* AnyOfSchema* OneOfSchema* <ReadOnly:Boolean> <WriteOnly:Boolean> <Type> <Title> <UniqueItems:Boolean> [XmlObject] <Ref>; AdditionalProperties ::= SchemaObject; EnumObj ::= <EnumOb:Object>; ItemsSchema ::= SchemaObject; @@ -142,11 +104,10 @@ DiscriminatorObject ::= <PropertyName> MappingTuple*; MappingTuple ::= <Key> <Value>; //XML Object -XmlObject ::= <Name> <Namespace> <Prefix> <Attribute:Object> <Wrapped:Object>; +XmlObject ::= <Name> <Namespace> <Prefix> <Attribute:Boolean> <Wrapped:Boolean>; //Security Scheme Object -SecuritySchemeObject ::= <Type> <Description> <Name> <In> <Scheme> <BearerFormat> Flows <OpenIdConnectUrl>; -Flows ::= OAuthFlowsObject; +SecuritySchemeObject ::= <Type> <Description> <Name> <In> <Scheme> <BearerFormat> OAuthFlowsObject <OpenIdConnectUrl> <Ref>; //OAuth Flows Object OAuthFlowsObject ::= [Implicit] [Password] [ClientCredentials] [AuthorizationCode]; @@ -156,10 +117,10 @@ ClientCredentials ::= OAuthFlowObject; AuthorizationCode ::= OAuthFlowObject; //OAuth Flow Object -OAuthFlowObject ::= <AuthorizationUrl> <TokenUrl> <RefreshUrl> ScopesTuple*; +OAuthFlowObject ::= <AuthorizationUrl> <TokenUrl> <RefreshUrl> ScopesTuple* <Configuration>; ScopesTuple ::= <ScopesKey> <ScopesValue>; //Security Requirement Object -//SecurityRequirementObject ::= SecurityRequirementValue*; +SecurityRequirementObject ::= SecurityRequirementTuple*; SecurityRequirementTuple ::= <Name> SecurityRequirementValue*; SecurityRequirementValue ::= <Value>; \ No newline at end of file diff --git a/src/main/jastadd/Parser.jrag b/src/main/jastadd/Parser.jrag index c7f5968407e8869db3162af816a2a65b50a62d99..230561c09d5511ca25caeb00bd1fafb9d34ecb00 100644 --- a/src/main/jastadd/Parser.jrag +++ b/src/main/jastadd/Parser.jrag @@ -3,27 +3,32 @@ aspect Parser { public static OpenAPIObject OpenAPIObject.parseOpenAPI(OpenApi3 api) throws IOException, ResolutionException, ValidationException { OpenAPIObject openapi = new OpenAPIObject(); + if( api.getOpenapi() != null ) openapi.setOpenAPI(api.getOpenapi()); - openapi.setInfoObject( InfoObject.parseInfo(api.getInfo()) ); + if( api.getInfo() != null ) + openapi.setInfoObject(InfoObject.parseInfo(api.getInfo())); + if( api.getPaths() != null ){ for( String key : api.getPaths().keySet() ) - openapi.addPathsObject( new PathsObject( key, PathItemObject.parsePath(api.getPath(key))) ); - - if( api.getServers() != null ) { + openapi.addPathsObject(new PathsObject( key, PathItem.parsePath(api.getPath(key)))); + } + if( api.getServers() != null ){ for( Server s : api.getServers() ) - openapi.addServerObject( ServerObject.parseServer(s) ); + openapi.addServerObject(ServerObject.parseServer(s)); } if( api.getComponents() != null ) - openapi.setComponentsObject( ComponentsObject.parseComponents(api.getComponents()) ); + openapi.setComponentsObject(ComponentsObject.parseComponents(api.getComponents())); if( api.getSecurityRequirements() != null ){ for( SecurityRequirement s : api.getSecurityRequirements() ) - openapi.addSecurityRequirementObject( SecurityRequirementObject.parseSecurityRequirement(s) ); + openapi.addSecurityRequirementObject(SecurityRequirementObject.parseSecurityRequirement(s)); } if( api.getTags() != null ){ for( org.openapi4j.parser.model.v3.Tag t : api.getTags() ) - openapi.addTagObject( TagObject.parseTag(t) ); + openapi.addTagObject(TagObject.parseTag(t)); } if( api.getExternalDocs() != null ) - openapi.setExternalDocumentationObject( ExternalDocumentationObject.parseExternalDocs(api.getExternalDocs()) ); + openapi.setExternalDocObject(ExternalDocObject.parseExternalDocs(api.getExternalDocs())); + if( api.getContext() != null ) + openapi.setContext(api.getContext()); return openapi; } @@ -31,17 +36,18 @@ public static OpenAPIObject OpenAPIObject.parseOpenAPI(OpenApi3 api) throws IOEx public static InfoObject InfoObject.parseInfo(Info info) { InfoObject infoObject = new InfoObject(); - infoObject.setTitle( info.getTitle() ); - infoObject.setVersion( info.getVersion() ); - + if( info.getTitle() != null ) + infoObject.setTitle(info.getTitle()); + if( info.getVersion() != null ) + infoObject.setVersion(info.getVersion()); if( info.getDescription() != null ) - infoObject.setDescription( info.getDescription() ); + infoObject.setDescription(info.getDescription()); if( info.getTermsOfService() != null ) - infoObject.setTermsOfService( info.getTermsOfService() ); + infoObject.setTermsOfService(info.getTermsOfService()); if( info.getContact() != null ) - infoObject.setContactObject( ContactObject.parseContact(info.getContact()) ); + infoObject.setContactObject(ContactObject.parseContact(info.getContact())); if( info.getLicense() != null ) - infoObject.setLicenseObject( LicenseObject.parseLicense(info.getLicense()) ); + infoObject.setLicenseObject(LicenseObject.parseLicense(info.getLicense())); return infoObject; } @@ -73,10 +79,10 @@ public static LicenseObject LicenseObject.parseLicense(License license){ public static ServerObject ServerObject.parseServer(Server server){ ServerObject serverObject = new ServerObject(); - serverObject.setUrl( server.getUrl() ); - + if( server.getUrl() != null ) + serverObject.setUrl(server.getUrl()); if( server.getDescription() != null ) - serverObject.setDescription( server.getDescription() ); + serverObject.setDescription(server.getDescription()); if( server.getVariables() != null ){ for (String key : server.getVariables().keySet()) serverObject.addServerVariablesTuple(new ServerVariablesTuple(key, ServerVariableObject.parseServerVariable(server.getVariable(key)))); @@ -88,10 +94,10 @@ public static ServerObject ServerObject.parseServer(Server server){ public static ServerVariableObject ServerVariableObject.parseServerVariable(ServerVariable serverVariable){ ServerVariableObject serverVariableObject = new ServerVariableObject(); - serverVariableObject.setDefault( serverVariable.getDefault() ); - + if( serverVariable.getDefault() != null ) + serverVariableObject.setDefault(serverVariable.getDefault()); if( serverVariable.getDescription() != null ) - serverVariableObject.setDescription( serverVariable.getDescription() ); + serverVariableObject.setDescription(serverVariable.getDescription()); if( serverVariable.getEnums() != null ){ for( String e : serverVariable.getEnums() ) serverVariableObject.addEnum(new Enum(e)); @@ -104,249 +110,228 @@ public static ComponentsObject ComponentsObject.parseComponents(Components compo ComponentsObject componentsObject = new ComponentsObject(); if( components.getSchemas() != null ){ - JastAddList<SchemasTuple> schemasTuples = new JastAddList<>(); for( String key : components.getSchemas().keySet() ){ + SchemaTuple schemaTuple = new SchemaTuple(); if( components.getSchema(key).isRef() ){ - SchemaReferenceTuple schema = new SchemaReferenceTuple(); - schema.setName(key); - schema.setRef(components.getSchema(key).getRef()); - schemasTuples.add(schema); + SchemaObject schemaObject = new SchemaObject(); + schemaObject.setRef(components.getSchema(key).getRef()); + schemaTuple.setKey(key); + schemaTuple.setSchemaObject(schemaObject); + componentsObject.addSchemaTuple(schemaTuple); } - else { - SchemaObjectTuple schema = new SchemaObjectTuple(); - schema.setName(key); - schema.setSchemaObject(SchemaObject.parseSchema(components.getSchema(key))); - schemasTuples.add(schema); + else{ + schemaTuple.setKey(key); + schemaTuple.setSchemaObject(SchemaObject.parseSchema(components.getSchema(key))); + componentsObject.addSchemaTuple(schemaTuple); } } - componentsObject.setSchemasTupleList(schemasTuples); } if( components.getResponses() != null ){ - JastAddList<ResponsesTuple> responsesTuples = new JastAddList<>(); for( String key : components.getResponses().keySet() ){ + ResponseTuple responseTuple = new ResponseTuple(); if( components.getResponse(key).isRef() ){ - ResponseReferenceTuple response = new ResponseReferenceTuple(); - response.setName(key); - response.setRef(components.getResponse(key).getRef()); - responsesTuples.add(response); + ResponseObject responseObject = new ResponseObject(); + responseObject.setRef(components.getResponse(key).getRef()); + responseTuple.setKey(key); + responseTuple.setResponseObject(responseObject); + componentsObject.addResponseTuple(responseTuple); } - else { - ResponseObjectTuple response = new ResponseObjectTuple(); - response.setName(key); - response.setResponseObject(ResponseObject.parseResponse(components.getResponse(key))); - responsesTuples.add(response); + else{ + responseTuple.setKey(key); + responseTuple.setResponseObject(ResponseObject.parseResponse(components.getResponse(key))); + componentsObject.addResponseTuple(responseTuple); } } - componentsObject.setResponsesTupleList(responsesTuples); } if( components.getParameters() != null ){ - JastAddList<ParameterTuple> parameterTuples = new JastAddList<>(); for( String key : components.getParameters().keySet() ){ + ParameterTuple parameterTuple = new ParameterTuple(); if( components.getParameter(key).isRef() ){ - ParameterReferenceTuple parameter = new ParameterReferenceTuple(); - parameter.setName(key); - parameter.setRef(components.getParameter(key).getRef()); - parameterTuples.add(parameter); + ParameterObject parameterObject = new ParameterObject(); + parameterObject.setRef(components.getParameter(key).getRef()); + parameterTuple.setKey(key); + parameterTuple.setParameterObject(parameterObject); + componentsObject.addParameterTuple(parameterTuple); } - else { - ParameterObjectTuple parameter = new ParameterObjectTuple(); - parameter.setName(key); - parameter.setParameterObject(ParameterObject.parseParameter(components.getParameter(key))); - parameterTuples.add(parameter); + else{ + parameterTuple.setKey(key); + parameterTuple.setParameterObject(ParameterObject.parseParameter(components.getParameter(key))); + componentsObject.addParameterTuple(parameterTuple); } } - componentsObject.setParameterTupleList(parameterTuples); } if( components.getExamples() != null ){ - JastAddList<ExamplesTuple> examplesTuples = new JastAddList<>(); for( String key : components.getExamples().keySet() ){ - ExampleObjectTuple exampleObjectTuple = new ExampleObjectTuple(); - exampleObjectTuple.setName( key ); - exampleObjectTuple.setExampleObject( ExampleObject.parseExample(components.getExample(key)) ); - examplesTuples.add(exampleObjectTuple); + ExampleTuple exampleTuple = new ExampleTuple(); + ExampleObject exampleObject = new ExampleObject(); + exampleTuple.setKey(key); + exampleTuple.setExampleObject(ExampleObject.parseExample(components.getExample(key))); + componentsObject.addExampleTuple(exampleTuple); } - componentsObject.setExamplesTupleList(examplesTuples); } if( components.getRequestBodies() != null ){ - JastAddList<RequestBodiesTuple> requestBodiesTuples = new JastAddList<>(); for( String key : components.getRequestBodies().keySet() ){ + RequestBodyTuple requestBodyTuple = new RequestBodyTuple(); if( components.getRequestBody(key).isRef() ){ - RequestBodyReferenceTuple requestBody = new RequestBodyReferenceTuple(); - requestBody.setName(key); - requestBody.setRef(components.getRequestBody(key).getRef()); - requestBodiesTuples.add(requestBody); + RequestBodyObject requestBodyObject = new RequestBodyObject(); + requestBodyObject.setRef(components.getRequestBody(key).getRef()); + requestBodyTuple.setKey(key); + requestBodyTuple.setRequestBodyObject(requestBodyObject); + componentsObject.addRequestBodyTuple(requestBodyTuple); } - else { - RequestBodyObjectTuple requestBody = new RequestBodyObjectTuple(); - requestBody.setName(key); - requestBody.setRequestBodyObject(RequestBodyObject.parseRequestBody(components.getRequestBody(key))); - requestBodiesTuples.add(requestBody); + else{ + requestBodyTuple.setKey(key); + requestBodyTuple.setRequestBodyObject(RequestBodyObject.parseRequestBody(components.getRequestBody(key))); + componentsObject.addRequestBodyTuple(requestBodyTuple); } } - componentsObject.setRequestBodiesTupleList(requestBodiesTuples); } if( components.getHeaders() != null ){ - JastAddList<HeadersTuple> headersTuples = new JastAddList<>(); for( String key : components.getHeaders().keySet() ){ + HeaderTuple headerTuple = new HeaderTuple(); if( components.getHeader(key).isRef() ){ - HeaderReferenceTuple header = new HeaderReferenceTuple(); - header.setName(key); - header.setRef(components.getHeader(key).getRef()); - headersTuples.add(header); + HeaderObject headerObject = new HeaderObject(); + headerObject.setRef(components.getHeader(key).getRef()); + headerTuple.setKey(key); + headerTuple.setHeaderObject(headerObject); + componentsObject.addHeaderTuple(headerTuple); } - else { - HeaderObjectTuple header = new HeaderObjectTuple(); - header.setName(key); - header.setHeaderObject(HeaderObject.parseHeader(components.getHeader(key))); - headersTuples.add(header); + else{ + headerTuple.setKey(key); + headerTuple.setHeaderObject(HeaderObject.parseHeader(components.getHeader(key))); + componentsObject.addHeaderTuple(headerTuple); } } - componentsObject.setHeadersTupleList(headersTuples); } if( components.getSecuritySchemes() != null ){ - JastAddList<SecuritySchemesTuple> securitySchemesTuples = new JastAddList<>(); for( String key : components.getSecuritySchemes().keySet() ){ + SecuritySchemeTuple securitySchemeTuple = new SecuritySchemeTuple(); if( components.getSecurityScheme(key).isRef() ){ - SecuritySchemeReferenceTuple securityScheme = new SecuritySchemeReferenceTuple(); - securityScheme.setName(key); - securityScheme.setRef(components.getSecurityScheme(key).getRef()); - securitySchemesTuples.add(securityScheme); + SecuritySchemeObject securitySchemeObject = new SecuritySchemeObject(); + securitySchemeObject.setRef(components.getSecurityScheme(key).getRef()); + securitySchemeTuple.setKey(key); + securitySchemeTuple.setSecuritySchemeObject(securitySchemeObject); + componentsObject.addSecuritySchemeTuple(securitySchemeTuple); } - else { - SecuritySchemeObjectTuple securityScheme = new SecuritySchemeObjectTuple(); - securityScheme.setName(key); - securityScheme.setSecuritySchemeObject(SecuritySchemeObject.parseSecurityScheme(components.getSecurityScheme(key))); - securitySchemesTuples.add(securityScheme); + else{ + securitySchemeTuple.setKey(key); + securitySchemeTuple.setSecuritySchemeObject(SecuritySchemeObject.parseSecurityScheme(components.getSecurityScheme(key))); + componentsObject.addSecuritySchemeTuple(securitySchemeTuple); } } - componentsObject.setSecuritySchemesTupleList(securitySchemesTuples); } if( components.getLinks() != null ){ - JastAddList<LinksTuple> linksTuples = new JastAddList<>(); for( String key : components.getLinks().keySet() ){ + LinkTuple linkTuple = new LinkTuple(); if( components.getLink(key).isRef() ){ - LinkReferenceTuple link = new LinkReferenceTuple(); - link.setName(key); - link.setRef(components.getLink(key).getRef()); - linksTuples.add(link); + LinkObject linkObject = new LinkObject(); + linkObject.setRef(components.getLink(key).getRef()); + linkTuple.setKey(key); + linkTuple.setLinkObject(linkObject); + componentsObject.addLinkTuple(linkTuple); } - else { - LinkObjectTuple link = new LinkObjectTuple(); - link.setName(key); - link.setLinkObject(LinkObject.parseLink(components.getLink(key))); - linksTuples.add(link); + else{ + linkTuple.setKey(key); + linkTuple.setLinkObject(LinkObject.parseLink(components.getLink(key))); + componentsObject.addLinkTuple(linkTuple); } } - componentsObject.setLinksTupleList(linksTuples); } if( components.getCallbacks() != null ){ - JastAddList<CallbacksTuple> callbacksTuples = new JastAddList<>(); for( String key : components.getCallbacks().keySet() ){ + CallbackTuple callbackTuple = new CallbackTuple(); if( components.getCallback(key).isRef() ){ - CallbackReferenceTuple callback = new CallbackReferenceTuple(); - callback.setName(key); - callback.setRef(components.getLink(key).getRef()); - callbacksTuples.add(callback); + CallbackObject callbackObject = new CallbackObject(); + callbackObject.setRef(components.getCallback(key).getRef()); + callbackTuple.setKey(key); + callbackTuple.setCallbackObject(callbackObject); + componentsObject.addCallbackTuple(callbackTuple); } - else { - CallbackObjectTuple callback = new CallbackObjectTuple(); - callback.setName(key); - callback.setCallbackObject(CallbackObject.parseCallback(components.getCallback(key))); - callbacksTuples.add(callback); + else{ + callbackTuple.setKey(key); + callbackTuple.setCallbackObject(CallbackObject.parseCallback(components.getCallback(key))); + componentsObject.addCallbackTuple(callbackTuple); } } - componentsObject.setCallbacksTupleList(callbacksTuples); } return componentsObject; } -public static PathsObject PathsObject.parsePaths(OpenApi3 api3){ - PathsObject pathsObject = new PathsObject(); - - for ( String key : api3.getPaths().keySet() ){ - pathsObject.setRef( key ); - pathsObject.setPathItemObject( PathItemObject.parsePath(api3.getPath(key)) ); - } - - return pathsObject; - } +public static PathItem PathItem.parsePath(Path path){ + PathItem pathItem = new PathItem(); -public static PathItemObject PathItemObject.parsePath(Path path){ - PathItemObject pathItemObject = new PathItemObject(); if( path.getRef() != null ) - pathItemObject.setRef( path.getRef() ); + pathItem.setRef(path.getRef()); if( path.getSummary() != null ) - pathItemObject.setSummary( path.getSummary() ); + pathItem.setSummary(path.getSummary()); if( path.getDescription() != null ) - pathItemObject.setDescription( path.getDescription() ); + pathItem.setDescription(path.getDescription()); if( path.getGet() != null ){ Get get = new Get(); get.setOperationObject( OperationObject.parseOperation( path.getGet() ) ); - pathItemObject.setGet(get); + pathItem.setGet(get); } if( path.getPut() != null ){ Put put = new Put(); put.setOperationObject( OperationObject.parseOperation( path.getPut() ) ); - pathItemObject.setPut(put); + pathItem.setPut(put); } if( path.getPost() != null ){ Post post = new Post(); post.setOperationObject( OperationObject.parseOperation( path.getPost() ) ); - pathItemObject.setPost(post); + pathItem.setPost(post); } if( path.getDelete() != null ){ Delete delete = new Delete(); delete.setOperationObject( OperationObject.parseOperation( path.getDelete() ) ); - pathItemObject.setDelete(delete); + pathItem.setDelete(delete); } if( path.getOptions() != null ){ Options options = new Options(); options.setOperationObject( OperationObject.parseOperation( path.getOptions() ) ); - pathItemObject.setOptions(options); + pathItem.setOptions(options); } if( path.getHead() != null ){ Head head = new Head(); head.setOperationObject( OperationObject.parseOperation( path.getHead() ) ); - pathItemObject.setHead(head); + pathItem.setHead(head); } if( path.getPatch() != null ){ Patch patch = new Patch(); patch.setOperationObject( OperationObject.parseOperation( path.getPatch() ) ); - pathItemObject.setPatch(patch); + pathItem.setPatch(patch); } if( path.getTrace() != null ){ Trace trace = new Trace(); trace.setOperationObject( OperationObject.parseOperation( path.getTrace() ) ); - pathItemObject.setTrace(trace); + pathItem.setTrace(trace); } if( path.getServers() != null ){ for(Server s : path.getServers()) - pathItemObject.addServerObject( ServerObject.parseServer(s)); + pathItem.addServerObject( ServerObject.parseServer(s)); } if( path.getParameters() != null ){ for(Parameter p : path.getParameters()){ if( p.isRef() ) { ParameterObject parameterObject = new ParameterObject(); parameterObject.setRef(p.getRef()); - pathItemObject.addParameterObject(parameterObject); + pathItem.addParameterObject(parameterObject); } else - pathItemObject.addParameterObject(ParameterObject.parseParameter(p)); + pathItem.addParameterObject(ParameterObject.parseParameter(p)); } } - return pathItemObject; + return pathItem; } public static OperationObject OperationObject.parseOperation(Operation operation){ OperationObject operationObject = new OperationObject(); - DeprecatedBoolean deprecatedBoolean = new DeprecatedBoolean(); - - deprecatedBoolean.setDeprecatedBoolean(operation.getDeprecated()); - operationObject.setDeprecatedBoolean(deprecatedBoolean); + if( operation.getDeprecated() != null ) + operationObject.setDeprecatedBoolean(operation.getDeprecated()); if( operation.getTags() != null ){ for(String t : operation.getTags()) { de.tudresden.inf.st.openapi.ast.Tag tag = new de.tudresden.inf.st.openapi.ast.Tag(); @@ -359,7 +344,7 @@ public static OperationObject OperationObject.parseOperation(Operation operation if( operation.getDescription() != null ) operationObject.setDescription( operation.getDescription() ); if( operation.getExternalDocs() != null ) - operationObject.setExternalDocumentationObject( ExternalDocumentationObject.parseExternalDocs(operation.getExternalDocs()) ); + operationObject.setExternalDocObject(ExternalDocObject.parseExternalDocs(operation.getExternalDocs())); if( operation.getOperationId() != null ) operationObject.setOperationID( operation.getOperationId() ); if( operation.getParameters() != null ){ @@ -369,27 +354,16 @@ public static OperationObject OperationObject.parseOperation(Operation operation if( operation.getRequestBody() != null ) operationObject.setRequestBodyObject( RequestBodyObject.parseRequestBody( operation.getRequestBody() ) ); if( operation.getResponses() != null ){ - ResponsesObject responsesObject = new ResponsesObject(); - for( String key : operation.getResponses().keySet()){ - ResponseObject responseObject; - responseObject = ResponseObject.parseResponse(operation.getResponse(key)); - responseObject.setName(key); - responsesObject.addHTTPStatusCode(responseObject); - } - operationObject.setResponsesObject(responsesObject); + for( String key : operation.getResponses().keySet()) + operationObject.addResponseTuple(new ResponseTuple(key, ResponseObject.parseResponse(operation.getResponse(key)))); } if( operation.getCallbacks() != null ){ - CallbackObjectTuple callbackObjectTuple = new CallbackObjectTuple(); - for( String key : operation.getCallbacks().keySet() ){ - callbackObjectTuple.setName(key); - callbackObjectTuple.setCallbackObject(CallbackObject.parseCallback(operation.getCallback(key))); - operationObject.addCallbacksTuple(callbackObjectTuple); - } + for( String key : operation.getCallbacks().keySet() ) + operationObject.addCallbackTuple(new CallbackTuple(key, CallbackObject.parseCallback(operation.getCallback(key)))); } - if( operation.getSecurityRequirements() != null ){ - for( SecurityRequirement sr : operation.getSecurityRequirements() ) - operationObject.addSecurityRequirementObject(SecurityRequirementObject.parseSecurityRequirement(sr)); + for( SecurityRequirement s : operation.getSecurityRequirements() ) + operationObject.addSecurityRequirementObject(SecurityRequirementObject.parseSecurityRequirement(s)); } if( operation.getServers() != null ){ for( Server s : operation.getServers() ) @@ -399,53 +373,55 @@ public static OperationObject OperationObject.parseOperation(Operation operation return operationObject; } -public static ExternalDocumentationObject ExternalDocumentationObject.parseExternalDocs(ExternalDocs externalDocs){ - ExternalDocumentationObject externalDocumentationObject = new ExternalDocumentationObject(); +public static ExternalDocObject ExternalDocObject.parseExternalDocs(ExternalDocs externalDocs){ + ExternalDocObject externalDocObject = new ExternalDocObject(); + if( externalDocs.getDescription() != null ) - externalDocumentationObject.setDescription( externalDocs.getDescription() ); - externalDocumentationObject.setUrl( externalDocs.getUrl() ); + externalDocObject.setDescription(externalDocs.getDescription()); + if( externalDocs.getUrl() != null ) + externalDocObject.setUrl(externalDocObject.getUrl()); + if( externalDocs.getExtensions() != null ) { + for( String key : externalDocs.getExtensions().keySet() ) + externalDocObject.addExtension(new Extension(key, externalDocs.getExtensions().get(key))); + } - return externalDocumentationObject; + return externalDocObject; } public static ParameterObject ParameterObject.parseParameter(Parameter parameter){ ParameterObject parameterObject = new ParameterObject(); + if( parameter.isRef() ) + parameterObject.setRef(parameter.getRef()); + if( parameter.getName() != null ) parameterObject.setName(parameter.getName()); + if( parameter.getIn() != null ) parameterObject.setIn(parameter.getIn()); - if( parameter.getRequired() == null ) - parameterObject.setRequired(false); - else - parameterObject.setRequired(parameter.getRequired()); - if( parameter.getDescription() != null ) - parameterObject.setDescription( parameter.getDescription() ); + parameterObject.setDescription(parameter.getDescription()); if( parameter.getDeprecated() != null ) - parameterObject.setDeprecatedBoolean( parameter.getDeprecated() ); + parameterObject.setDeprecatedBoolean(parameter.getDeprecated()); if( parameter.getStyle() != null ) parameterObject.setStyle( parameter.getStyle() ); if( parameter.getExplode() != null ) parameterObject.setExplode( parameter.getExplode() ); if( parameter.getAllowReserved() != null ) parameterObject.setAllowReserved( parameter.getAllowReserved() ); - if( parameter.getSchema() != null ){ - SchemaObject schema = new SchemaObject(); - schema = SchemaObject.parseSchema(parameter.getSchema()); - if( parameter.getSchema().isRef() ) - schema.setRef(parameter.getSchema().getRef()); - parameterObject.setSchemaObject(schema); - } + if( parameter.getSchema() != null ) + parameterObject.setSchemaObject(SchemaObject.parseSchema(parameter.getSchema())); if( parameter.getExample() != null ) parameterObject.setExample( parameter.getExample() ); if( parameter.getExamples() != null ){ for( String key : parameter.getExamples().keySet() ) - parameterObject.addExamplesTuple(new ExampleObjectTuple(key, ExampleObject.parseExample(parameter.getExample(key)))); + parameterObject.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(parameter.getExample(key)))); } if( parameter.getContentMediaTypes() != null ){ for( String key : parameter.getContentMediaTypes().keySet() ) - parameterObject.addContentTuple(new ContentObjectTuple(key, MediaTypeObject.parseMediaType(parameter.getContentMediaType(key)))); + parameterObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(parameter.getContentMediaType(key)))); } + if( parameter.getRequired() != null ) + parameterObject.setRequired(parameter.getRequired()); return parameterObject; } @@ -455,14 +431,14 @@ public static RequestBodyObject RequestBodyObject.parseRequestBody(org.openapi4j if( requestBody.getContentMediaTypes() != null ) { for (String key : requestBody.getContentMediaTypes().keySet()) - requestBodyObject.addContentTuple(new ContentObjectTuple(key, MediaTypeObject.parseMediaType(requestBody.getContentMediaType(key)))); + requestBodyObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(requestBody.getContentMediaType(key)))); } if( requestBody.getDescription() != null ) requestBodyObject.setDescription(requestBody.getDescription()); if( requestBody.getRequired() != null ) requestBodyObject.setRequired( requestBody.getRequired() ); if( requestBody.isRef() ) - requestBodyObject.setRef(requestBody.getRef()); + requestBodyObject.setRef(requestBody.getRef()); return requestBodyObject; } @@ -470,20 +446,17 @@ public static RequestBodyObject RequestBodyObject.parseRequestBody(org.openapi4j public static MediaTypeObject MediaTypeObject.parseMediaType(MediaType mediaType){ MediaTypeObject mediaTypeObject = new MediaTypeObject(); - if( mediaType.getSchema() != null ) { - SchemaObject schema = new SchemaObject(); - schema = SchemaObject.parseSchema(mediaType.getSchema()); - mediaTypeObject.setSchemaObject(schema); - } + if( mediaType.getSchema() != null ) + mediaTypeObject.setSchemaObject(SchemaObject.parseSchema(mediaType.getSchema())); if( mediaType.getExample() != null ) - mediaTypeObject.setExample( mediaType.getExample() ); + mediaTypeObject.setExample(mediaType.getExample()); if( mediaType.getExamples() != null ){ for( String key : mediaType.getExamples().keySet() ) - mediaTypeObject.addExamplesTuple(new ExampleObjectTuple(key, ExampleObject.parseExample(mediaType.getExample(key)))); + mediaTypeObject.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(mediaType.getExample(key)))); } if( mediaType.getEncodings() != null ){ for( String key : mediaType.getEncodings().keySet() ) - mediaTypeObject.addEncodingTuple(new EncodingObjectTuple(key, EncodingObject.parseEncoding(mediaType.getEncoding(key)))); + mediaTypeObject.addEncodingTuple(new EncodingTuple(key, EncodingObject.parseEncoding(mediaType.getEncoding(key)))); } return mediaTypeObject; @@ -496,13 +469,16 @@ public static EncodingObject EncodingObject.parseEncoding(EncodingProperty encod encodingObject.setContentType( encodingProperty.getContentType() ); if( encodingProperty.getHeaders() != null ){ for( String key : encodingProperty.getHeaders().keySet() ) - encodingObject.addHeadersTuple(new HeaderObjectTuple(key, HeaderObject.parseHeader(encodingProperty.getHeader(key)))); + encodingObject.addHeaderTuple(new HeaderTuple(key, HeaderObject.parseHeader(encodingProperty.getHeader(key)))); } if( encodingProperty.getStyle() != null ) encodingObject.setStyle( encodingProperty.getStyle() ); if( encodingProperty.getExplode() != null ) encodingObject.setExplode( encodingProperty.getExplode() ); - // if( encodingProperty.getAllowReserved() != null ) /** parser for allowReserved non-existent **/ + if( encodingProperty.getExtensions() != null ){ + for( String key : encodingProperty.getExtensions().keySet() ) + encodingObject.addExtension(new Extension(key, encodingProperty.getExtensions().get(key))); + } return encodingObject; } @@ -510,19 +486,21 @@ public static EncodingObject EncodingObject.parseEncoding(EncodingProperty encod public static ResponseObject ResponseObject.parseResponse(Response response){ ResponseObject responseObject = new ResponseObject(); - responseObject.setDescription( response.getDescription() ); - + if( response.isRef() ) + responseObject.setRef(response.getRef()); + if( response.getDescription() != null ) + responseObject.setDescription(response.getDescription()); if( response.getHeaders() != null ){ for( String key : response.getHeaders().keySet() ) - responseObject.addHeadersTuple( new HeaderObjectTuple(key, HeaderObject.parseHeader(response.getHeader(key))) ); + responseObject.addHeaderTuple( new HeaderTuple(key, HeaderObject.parseHeader(response.getHeader(key))) ); } if( response.getContentMediaTypes() != null ){ for( String key : response.getContentMediaTypes().keySet() ) - responseObject.addContentTuple( new ContentObjectTuple(key, MediaTypeObject.parseMediaType(response.getContentMediaType(key))) ); + responseObject.addContentTuple( new ContentTuple(key, MediaTypeObject.parseMediaType(response.getContentMediaType(key))) ); } if( response.getLinks() != null ){ for( String key : response.getLinks().keySet() ) - responseObject.addLinksTuple( new LinkObjectTuple(key, LinkObject.parseLink(response.getLink(key))) ); + responseObject.addLinkTuple( new LinkTuple(key, LinkObject.parseLink(response.getLink(key))) ); } return responseObject; @@ -533,7 +511,7 @@ public static CallbackObject CallbackObject.parseCallback(Callback callback){ if( callback.getCallbackPaths() != null ){ for( String key : callback.getCallbackPaths().keySet() ) - callbackObject.addExpression(new Expression(key, PathItemObject.parsePath(callback.getCallbackPath(key)))); + callbackObject.addExpression(new Expression(key, PathItem.parsePath(callback.getCallbackPath(key)))); } return callbackObject; @@ -557,6 +535,8 @@ public static ExampleObject ExampleObject.parseExample(Example example){ public static LinkObject LinkObject.parseLink(Link link){ LinkObject linkObject = new LinkObject(); + if( link.isRef() ) + linkObject.setRef(link.getRef()); if( link.getOperationRef() != null ) linkObject.setOperationRef( link.getOperationRef() ); if( link.getOperationId() != null ) @@ -592,12 +572,14 @@ public static HeaderObject HeaderObject.parseHeader(Header header){ headerObject.setExample( header.getExample() ); if( header.getExamples() != null ){ for( String key : header.getExamples().keySet() ) - headerObject.addExamplesTuple(new ExampleObjectTuple(key, ExampleObject.parseExample(header.getExample(key)))); + headerObject.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(header.getExample(key)))); } if( header.getContentMediaTypes() != null ){ for( String key : header.getContentMediaTypes().keySet() ) - headerObject.addContentTuple(new ContentObjectTuple(key, MediaTypeObject.parseMediaType(header.getContentMediaType(key)))); + headerObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(header.getContentMediaType(key)))); } + if( header.getSchema() != null ) + headerObject.setSchemaObject(SchemaObject.parseSchema(header.getSchema())); return headerObject; } @@ -610,7 +592,7 @@ public static TagObject TagObject.parseTag(org.openapi4j.parser.model.v3.Tag tag if( tag.getDescription() != null ) tagObject.setDescription( tag.getDescription() ); if( tag.getExternalDocs() != null ) - tagObject.setExternalDocumentationObject( ExternalDocumentationObject.parseExternalDocs(tag.getExternalDocs()) ); + tagObject.setExternalDocObject( ExternalDocObject.parseExternalDocs(tag.getExternalDocs()) ); return tagObject; } @@ -618,11 +600,10 @@ public static TagObject TagObject.parseTag(org.openapi4j.parser.model.v3.Tag tag public static SchemaObject SchemaObject.parseSchema (org.openapi4j.parser.model.v3.Schema schema) { SchemaObject schemaObject = new SchemaObject(); - if( schema.getAdditionalProperties() != null ){ - AdditionalProperties additionalProperties = new AdditionalProperties(); - additionalProperties.setSchemaObject(parseSchema(schema.getAdditionalProperties())); - schemaObject.setAdditionalProperties(additionalProperties); - } + if( schema.isRef() ) + schemaObject.setRef(schema.getRef()); + if( schema.getAdditionalProperties() != null ) + schemaObject.setAdditionalProperties(parseSchema(schema.getAdditionalProperties())); if( schema.getAdditionalPropertiesAllowed() != null ) schemaObject.setAdditionalPropertiesAllowed(schema.getAdditionalPropertiesAllowed()); if( schema.getDefault() != null ) @@ -634,8 +615,8 @@ public static SchemaObject SchemaObject.parseSchema (org.openapi4j.parser.model. if( schema.getDiscriminator() != null ) schemaObject.setDiscriminatorObject(DiscriminatorObject.parseDiscriminator(schema.getDiscriminator())); if( schema.getEnums() != null ){ - EnumObj enumObj = new EnumObj(); for( Object o : schema.getEnums() ){ + EnumObj enumObj = new EnumObj(); enumObj.setEnumOb(o); schemaObject.addEnumObj(enumObj); } @@ -647,7 +628,7 @@ public static SchemaObject SchemaObject.parseSchema (org.openapi4j.parser.model. if( schema.getExclusiveMinimum() != null ) schemaObject.setExclusiveMinimum(schema.getExclusiveMinimum()); if( schema.getExternalDocs() != null ) - schemaObject.setExternalDocumentationObject(ExternalDocumentationObject.parseExternalDocs(schema.getExternalDocs())); + schemaObject.setExternalDocObject(ExternalDocObject.parseExternalDocs(schema.getExternalDocs())); if( schema.getFormat() != null ) schemaObject.setFormat(schema.getFormat()); if( schema.getItemsSchema() != null ){ @@ -683,34 +664,35 @@ public static SchemaObject SchemaObject.parseSchema (org.openapi4j.parser.model. if( schema.getPattern() != null ) schemaObject.setPattern(schema.getPattern()); if( schema.getProperties() != null ){ + for( String key : schema.getProperties().keySet() ){ PropertyItem propertyItem = new PropertyItem(); - for( String key : schema.getProperties().keySet() ) schemaObject.addPropertyItem(new PropertyItem(key, parseSchema(schema.getProperty(key)))); } + } if( schema.getRequiredFields() != null ){ - RequiredField requiredField = new RequiredField(); for( String s : schema.getRequiredFields() ){ + RequiredField requiredField = new RequiredField(); requiredField.setValue(s); schemaObject.addRequiredField(requiredField); } } if( schema.getAllOfSchemas() != null ){ - AllOfSchema allOfSchema = new AllOfSchema(); for(org.openapi4j.parser.model.v3.Schema schemaItem : schema.getAllOfSchemas()){ + AllOfSchema allOfSchema = new AllOfSchema(); allOfSchema.setSchemaObject(parseSchema(schemaItem)); schemaObject.addAllOfSchema(allOfSchema); } } if( schema.getAnyOfSchemas() != null ){ - AnyOfSchema anyOfSchema = new AnyOfSchema(); for(org.openapi4j.parser.model.v3.Schema schemaItem : schema.getAnyOfSchemas()){ + AnyOfSchema anyOfSchema = new AnyOfSchema(); anyOfSchema.setSchemaObject(parseSchema(schemaItem)); schemaObject.addAnyOfSchema(anyOfSchema); } } if( schema.getOneOfSchemas() != null ){ - OneOfSchema oneOfSchema = new OneOfSchema(); for(org.openapi4j.parser.model.v3.Schema schemaItem : schema.getOneOfSchemas()){ + OneOfSchema oneOfSchema = new OneOfSchema(); oneOfSchema.setSchemaObject(parseSchema(schemaItem)); schemaObject.addOneOfSchema(oneOfSchema); } @@ -767,15 +749,13 @@ public static XmlObject XmlObject.parseXml (Xml xml) { public static SecuritySchemeObject SecuritySchemeObject.parseSecurityScheme(SecurityScheme securityScheme){ SecuritySchemeObject securitySchemeObject = new SecuritySchemeObject(); - Flows flows = new Flows(); securitySchemeObject.setType( securityScheme.getType() ); securitySchemeObject.setName( securityScheme.getName() ); securitySchemeObject.setIn( securityScheme.getIn() ); securitySchemeObject.setScheme( securityScheme.getScheme() ); securitySchemeObject.setOpenIdConnectUrl( securityScheme.getOpenIdConnectUrl() ); - flows.setOAuthFlowsObject( OAuthFlowsObject.parseOAuthFlows(securityScheme.getFlows()) ); - securitySchemeObject.setFlows( flows ); + securitySchemeObject.setOAuthFlowsObject( OAuthFlowsObject.parseOAuthFlows(securityScheme.getFlows()) ); if( securityScheme.getDescription() != null ) securitySchemeObject.setDescription( securityScheme.getDescription() ); diff --git a/src/main/java/de/tudresden/inf/st/openapi/OpenAPIMain.java b/src/main/java/de/tudresden/inf/st/openapi/OpenAPIMain.java index 70cb8aa497752f429083c34ef4d44877a580d4be..95114e34aa080753e324a0251bf73202b9fd4158 100644 --- a/src/main/java/de/tudresden/inf/st/openapi/OpenAPIMain.java +++ b/src/main/java/de/tudresden/inf/st/openapi/OpenAPIMain.java @@ -33,7 +33,7 @@ public class OpenAPIMain { ValidationResults results = new ValidationResults(); String fileName = "link-example.json"; - FileWriter writer = new FileWriter("./gen-api-ex/callback-example_generated.json"); + //FileWriter writer = new FileWriter("./gen-api-ex/callback-example_generated.json"); URL expUrl = OpenAPIMain.class.getClassLoader().getResource(fileName); File file = null; @@ -55,11 +55,8 @@ public class OpenAPIMain { results = OpenApi3Validator.instance().validate(api3); - System.out.println(results.isValid()); - System.out.println(api.toNode().equals(api3.toNode())); - - if( api.getPath("/2.0/repositories/{username}").getGet().getResponse("200").getContentMediaType("application/json").getSchema() != null ) - System.out.println(api.getPath("/2.0/repositories/{username}").getGet().getResponse("200").getContentMediaType("application/json").getSchema().getItemsSchema().getRef()); + if( api.getPath("/2.0/repositories/{username}").getGet().getOperationId() != null ) + System.out.println(api.getPath("/2.0/repositories/{username}").getGet().getOperationId()); //writer.write(api3.toNode().toPrettyString()); diff --git a/src/test/java/openapi/OpenAPIMain_test.java b/src/test/java/openapi/OpenAPIMain_test.java index 2e7b4a590b2487b45556ec4e184d06dbef5b0c42..29a65fc7b45aee7c6b74a84c3df0c1c54b531fe7 100644 --- a/src/test/java/openapi/OpenAPIMain_test.java +++ b/src/test/java/openapi/OpenAPIMain_test.java @@ -66,10 +66,10 @@ public class OpenAPIMain_test { api3 = OpenAPIObject.composeOpenAPI(openApi); // check, if the composed openAPI object is valid - results = OpenApi3Validator.instance().validate(api); - System.out.println("Is the source object valid? : " + results.isValid()); - results = OpenApi3Validator.instance().validate(api3); - System.out.println("Is the generated object valid? : " + results.isValid()); + //results = OpenApi3Validator.instance().validate(api); + //System.out.println("Is the source object valid? : " + results.isValid()); + //results = OpenApi3Validator.instance().validate(api3); + //System.out.println("Is the generated object valid? : " + results.isValid()); // compare if api (source object) is equivalent to api3 (generated object) compareJson(api3.toNode(), api.toNode(), Paths.get(file));