diff --git a/.gradle/6.8/executionHistory/executionHistory.bin b/.gradle/6.8/executionHistory/executionHistory.bin index 0f7550483cbac03a6943f36caf5eb368ea8e8533..0e6cd050897aa1d796485381ea7fbbb5571a3f0f 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 f04164c5b43e280d7903b65a983e5c2edfcedc53..b15cd96106100d3f46f39b86038a6364045649e4 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 28a65b8a0c44877891d72771d040a6d646833f41..948cfe6f2e57bac8d21cd745b91bf03533e41c8e 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 3ae90a3c2bc5f1c7312b199146506c253121358d..47429c2d5ffd12e5c76510b53f431febc7513881 100644 Binary files a/.gradle/6.8/fileHashes/fileHashes.lock and b/.gradle/6.8/fileHashes/fileHashes.lock differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 0d0e4b6f7d6de0149763d41690f360a98544f23e..c5945a055356443cf0989631e52753b7d998275a 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock index 7fb77cbf61c8cf5e25196ee5fd9dbd42bd7fc6ba..3e799de70624f1812796fdc46f51a5bff5d926ba 100644 Binary files a/.gradle/checksums/checksums.lock and b/.gradle/checksums/checksums.lock differ diff --git a/.gradle/checksums/md5-checksums.bin b/.gradle/checksums/md5-checksums.bin index 13efa9f47526d2e3364966a6a5cecd5bd7cd2edb..9622c31f5deaba71198906c41db4836856bad0e2 100644 Binary files a/.gradle/checksums/md5-checksums.bin and b/.gradle/checksums/md5-checksums.bin differ diff --git a/.gradle/checksums/sha1-checksums.bin b/.gradle/checksums/sha1-checksums.bin index c2433574317d940eb9d09e3ef7699d3fa15c78eb..453a65f119644777d375c278e15657fb7e218ae5 100644 Binary files a/.gradle/checksums/sha1-checksums.bin and b/.gradle/checksums/sha1-checksums.bin differ diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 001ab83a79085de6c85bd9db879b40886bc0717a..2456eb5d6aedbb164ee410be56f8cd4c428c8227 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -7,6 +7,7 @@ <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> <outputRelativeToContentRoot value="true" /> <module name="jastadd-openapi" /> + <module name="openapi-parser" /> </profile> </annotationProcessing> <bytecodeTargetLevel target="1.8" /> diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000000000000000000000000000000000..1ad1369d29352a4e044c2a4e1a8fe6c02b177945 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/.idea/bachelor-thesis-jastadd.iml" filepath="$PROJECT_DIR$/.idea/bachelor-thesis-jastadd.iml" /> + </modules> + </component> +</project> \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 797acea53eb091cf5b30518802c3073f544adeed..0000000000000000000000000000000000000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="RunConfigurationProducerService"> - <option name="ignoredProducers"> - <set> - <option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" /> - </set> - </option> - </component> -</project> \ No newline at end of file diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/HttpURLConnectionExample.class b/build/classes/java/main/de/tudresden/inf/st/openapi/HttpURLConnectionExample.class deleted file mode 100644 index f117b63487535d717d8aee6a5ef629339ca5952d..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/HttpURLConnectionExample.class and /dev/null differ 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 deleted file mode 100644 index bc1be9ede6e150f306673f71b36a1b9cb9bb5f64..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/OpenAPIMain.class and /dev/null 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 deleted file mode 100644 index dc12d1ab4c3bbdacc7cdfe5935b69472b39a20e4..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode$1.class and /dev/null 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 deleted file mode 100644 index f8115d06314d2c99f3bb61ba7412e6d352b7bcc2..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode$2.class and /dev/null 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 deleted file mode 100644 index 2091e07b4e55ec50b70268a7ec1830d370d56919..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ASTNode.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/exception/DecodeException.class b/build/classes/java/main/org/openapi4j/core/exception/DecodeException.class deleted file mode 100644 index 5b9935de47f7d7f022ffcfea3245312bd880f1c0..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/exception/DecodeException.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/exception/EncodeException.class b/build/classes/java/main/org/openapi4j/core/exception/EncodeException.class deleted file mode 100644 index 58a733f4811f352b32d7a640a3d35f1eddfde11f..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/exception/EncodeException.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/exception/ResolutionException.class b/build/classes/java/main/org/openapi4j/core/exception/ResolutionException.class deleted file mode 100644 index 90f46a2b087036ecfaee7b27e2b70bb0df6a31d8..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/exception/ResolutionException.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/AuthOption$Type.class b/build/classes/java/main/org/openapi4j/core/model/AuthOption$Type.class deleted file mode 100644 index 6a6c3a5272e43fb853501a76a598d4f8ba1b960a..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/AuthOption$Type.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/AuthOption.class b/build/classes/java/main/org/openapi4j/core/model/AuthOption.class deleted file mode 100644 index c4366527575021defcf983c7c3e80313e5a7b71c..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/AuthOption.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/OAI.class b/build/classes/java/main/org/openapi4j/core/model/OAI.class deleted file mode 100644 index 65bf72f76d470bda310b92fac47d06b126b4fa44..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/OAI.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/OAIContext.class b/build/classes/java/main/org/openapi4j/core/model/OAIContext.class deleted file mode 100644 index cc714df3e165537c2e59e8ff5f43b77e8cafd03a..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/OAIContext.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/reference/AbstractReferenceResolver.class b/build/classes/java/main/org/openapi4j/core/model/reference/AbstractReferenceResolver.class deleted file mode 100644 index a86ebf0afd6b5bdf27f6ca9f47e6d2db8b53fa9d..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/reference/AbstractReferenceResolver.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/reference/Reference.class b/build/classes/java/main/org/openapi4j/core/model/reference/Reference.class deleted file mode 100644 index d1a90e0f4798ccf27cda22a794bc397cb21a9086..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/reference/Reference.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/reference/ReferenceRegistry.class b/build/classes/java/main/org/openapi4j/core/model/reference/ReferenceRegistry.class deleted file mode 100644 index 06e6852c59bdaedab67af0da8db7b8ad66038ad4..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/reference/ReferenceRegistry.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/reference/ReferenceResolver.class b/build/classes/java/main/org/openapi4j/core/model/reference/ReferenceResolver.class deleted file mode 100644 index 1c57a198536c94208045ec6111f3b833ecece847..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/reference/ReferenceResolver.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/reference/ReferenceUrl.class b/build/classes/java/main/org/openapi4j/core/model/reference/ReferenceUrl.class deleted file mode 100644 index e91c6a65f015f5d36f583e6061c1e34791416420..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/reference/ReferenceUrl.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/v3/MappingReferenceResolver.class b/build/classes/java/main/org/openapi4j/core/model/v3/MappingReferenceResolver.class deleted file mode 100644 index 5e8fd53ff9773b63400a886894852728e9957cc1..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/v3/MappingReferenceResolver.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/v3/OAI3.class b/build/classes/java/main/org/openapi4j/core/model/v3/OAI3.class deleted file mode 100644 index 5dc916d114787ad0aea3eba27f8a067fa820e4e8..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/v3/OAI3.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/v3/OAI3Context.class b/build/classes/java/main/org/openapi4j/core/model/v3/OAI3Context.class deleted file mode 100644 index 1fec83158b7b415b578f798af05f62a64df942e7..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/v3/OAI3Context.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/model/v3/OAI3SchemaKeywords.class b/build/classes/java/main/org/openapi4j/core/model/v3/OAI3SchemaKeywords.class deleted file mode 100644 index de70fbe5e17242fdfae9c7a56b4c282276bdf885..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/model/v3/OAI3SchemaKeywords.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/util/IOUtil.class b/build/classes/java/main/org/openapi4j/core/util/IOUtil.class deleted file mode 100644 index bb12b9ac8da509aa53b7e01121a0ddb43390b487..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/util/IOUtil.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/util/MultiStringMap.class b/build/classes/java/main/org/openapi4j/core/util/MultiStringMap.class deleted file mode 100644 index 2463e458abc07fc30929a907b20be48827fba725..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/util/MultiStringMap.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/util/StringUtil.class b/build/classes/java/main/org/openapi4j/core/util/StringUtil.class deleted file mode 100644 index bef009b8749087675682bd4ceb35b3e4c2e498c7..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/util/StringUtil.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/util/TreeUtil.class b/build/classes/java/main/org/openapi4j/core/util/TreeUtil.class deleted file mode 100644 index ddd0dceddb32a869d1eaad79b704f23648c03f07..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/util/TreeUtil.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/util/UrlContentRetriever.class b/build/classes/java/main/org/openapi4j/core/util/UrlContentRetriever.class deleted file mode 100644 index f231794dbd2d72aecf002063546f75bac758b3f9..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/util/UrlContentRetriever.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/validation/ValidationCode.class b/build/classes/java/main/org/openapi4j/core/validation/ValidationCode.class deleted file mode 100644 index 09cffeeddece7487dc4627a7ebc221334e0aef3b..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/validation/ValidationCode.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/validation/ValidationException.class b/build/classes/java/main/org/openapi4j/core/validation/ValidationException.class deleted file mode 100644 index 2e3e4579d85279777bdf9001ad847f9fe233df3b..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/validation/ValidationException.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/validation/ValidationResult.class b/build/classes/java/main/org/openapi4j/core/validation/ValidationResult.class deleted file mode 100644 index d46975dcdfdc8077100d8bf1f1acb3204a08efb1..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/validation/ValidationResult.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/validation/ValidationResults$1.class b/build/classes/java/main/org/openapi4j/core/validation/ValidationResults$1.class deleted file mode 100644 index bb084514d71ebf9e444dbb84106a77c7d2005932..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/validation/ValidationResults$1.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/validation/ValidationResults$CrumbInfo.class b/build/classes/java/main/org/openapi4j/core/validation/ValidationResults$CrumbInfo.class deleted file mode 100644 index 5403563c0800ce79ada8f3b4f9ec061f897f44fe..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/validation/ValidationResults$CrumbInfo.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/validation/ValidationResults$ValidationItem.class b/build/classes/java/main/org/openapi4j/core/validation/ValidationResults$ValidationItem.class deleted file mode 100644 index a7da5988319bf40778cc47400c80c41527ed1439..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/validation/ValidationResults$ValidationItem.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/validation/ValidationResults.class b/build/classes/java/main/org/openapi4j/core/validation/ValidationResults.class deleted file mode 100644 index 235a2f86e5e83cdeddaf76f053ed2ff8d5188f45..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/validation/ValidationResults.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/core/validation/ValidationSeverity.class b/build/classes/java/main/org/openapi4j/core/validation/ValidationSeverity.class deleted file mode 100644 index 2da8e3c822b4d7dbf24754f95035675b3a41ada2..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/core/validation/ValidationSeverity.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/OpenApi3Parser.class b/build/classes/java/main/org/openapi4j/parser/OpenApi3Parser.class deleted file mode 100644 index 4eaf13fe1d1096df1b13721b6e6da3cbc1732ca6..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/OpenApi3Parser.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/OpenApiParser.class b/build/classes/java/main/org/openapi4j/parser/OpenApiParser.class deleted file mode 100644 index 1454f993ed3fcda0b58669f3003b8db942e99352..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/OpenApiParser.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema$1.class b/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema$1.class deleted file mode 100644 index 4cfd2c04f1a1cc50a5a2492114087dd7ba5d1ac8..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema$1.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema$Views$Internal.class b/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema$Views$Internal.class deleted file mode 100644 index 92d2081da86a42f70c2b8f3c3cebea1504b2e58e..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema$Views$Internal.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema$Views$Public.class b/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema$Views$Public.class deleted file mode 100644 index 2f3546d2005a9786a0039766462802d70e6eeb63..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema$Views$Public.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema$Views.class b/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema$Views.class deleted file mode 100644 index 83e9669c5e7e416a70f39e009a3c617593132691..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema$Views.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema.class b/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema.class deleted file mode 100644 index c90734521d64168897598f6622b0db8bbb5713cb..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/AbsOpenApiSchema.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/AbsRefOpenApiSchema.class b/build/classes/java/main/org/openapi4j/parser/model/AbsRefOpenApiSchema.class deleted file mode 100644 index ae8582feb37de01315c2fb0e58dffe9c44134961..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/AbsRefOpenApiSchema.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/OpenApiSchema.class b/build/classes/java/main/org/openapi4j/parser/model/OpenApiSchema.class deleted file mode 100644 index 90ee64a66f845be15eec3375fa080ae161522bf2..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/OpenApiSchema.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/SerializationFlag.class b/build/classes/java/main/org/openapi4j/parser/model/SerializationFlag.class deleted file mode 100644 index 92205898b832426debe82c865b581f893753e99d..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/SerializationFlag.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/AbsExtendedOpenApiSchema.class b/build/classes/java/main/org/openapi4j/parser/model/v3/AbsExtendedOpenApiSchema.class deleted file mode 100644 index b6ea18497a52a71bfe7da1711c2b1047c26ec7b4..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/AbsExtendedOpenApiSchema.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/AbsExtendedRefOpenApiSchema.class b/build/classes/java/main/org/openapi4j/parser/model/v3/AbsExtendedRefOpenApiSchema.class deleted file mode 100644 index 6986e91c8b3885377a9be251432ae930be269345..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/AbsExtendedRefOpenApiSchema.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/AbsParameter.class b/build/classes/java/main/org/openapi4j/parser/model/v3/AbsParameter.class deleted file mode 100644 index 8325d5c34b13cfa2e1887e8f9d375639d3eacad7..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/AbsParameter.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Callback.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Callback.class deleted file mode 100644 index 3267adc48e0a190243534dbce7cd3115fe433666..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Callback.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Components.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Components.class deleted file mode 100644 index 5664749a24ecd0727a9690c78ebfcb1dd30a3935..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Components.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Contact.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Contact.class deleted file mode 100644 index cba1e4e4eaf779f15981a9e3a85069e25cb1af7e..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Contact.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Discriminator.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Discriminator.class deleted file mode 100644 index c50406cae555b6e7b31bc6dc3229cf600050461f..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Discriminator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/EncodingProperty.class b/build/classes/java/main/org/openapi4j/parser/model/v3/EncodingProperty.class deleted file mode 100644 index 357dad9740be9592c5830069b0ecfa0f4eede8d3..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/EncodingProperty.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Example.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Example.class deleted file mode 100644 index 0cbbd2fd66bf447de057d5624c4a420e2dda23a3..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Example.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/ExternalDocs.class b/build/classes/java/main/org/openapi4j/parser/model/v3/ExternalDocs.class deleted file mode 100644 index 710b57fcf1d5ed1f80dd217253fc593584685e5a..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/ExternalDocs.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Header.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Header.class deleted file mode 100644 index a15978b90797e0dad5b9d0a7262da96face1ffc0..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Header.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Info.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Info.class deleted file mode 100644 index 9e7254584d394dcd5cb7380cab943a16b1a933af..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Info.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/License.class b/build/classes/java/main/org/openapi4j/parser/model/v3/License.class deleted file mode 100644 index dcc611391dfeb77b1f5105e508c12aad8c773e54..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/License.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Link.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Link.class deleted file mode 100644 index 04200e24f7ec89b393eabdba160b075f18c16ed3..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Link.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/MediaType.class b/build/classes/java/main/org/openapi4j/parser/model/v3/MediaType.class deleted file mode 100644 index 9402f544c8920241cc1d1cf7ef2b13a6b1bf94e3..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/MediaType.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/OAuthFlow.class b/build/classes/java/main/org/openapi4j/parser/model/v3/OAuthFlow.class deleted file mode 100644 index 5e28ed033d5e32850e838d0c90208cdeccf773df..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/OAuthFlow.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/OAuthFlows.class b/build/classes/java/main/org/openapi4j/parser/model/v3/OAuthFlows.class deleted file mode 100644 index e66fd1fd534d11e2c0cbef2b6ae5557bc774cc99..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/OAuthFlows.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/OpenApi3.class b/build/classes/java/main/org/openapi4j/parser/model/v3/OpenApi3.class deleted file mode 100644 index e6be80f7634784390ab4fae8be14355e1cab2c8c..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/OpenApi3.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Operation.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Operation.class deleted file mode 100644 index c015f03bc345a138a39548870cf1a685c6f297cc..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Operation.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Parameter.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Parameter.class deleted file mode 100644 index 8de331bb9d3601f3a3b783ccc4752fa66f75e529..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Parameter.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/ParameterUtil.class b/build/classes/java/main/org/openapi4j/parser/model/v3/ParameterUtil.class deleted file mode 100644 index 16886fe0aa274bf937b802221495ad0703068c56..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/ParameterUtil.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Path.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Path.class deleted file mode 100644 index 72d4d43eab15a32bd9d46b163bdc0d5f850f5451..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Path.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/RequestBody.class b/build/classes/java/main/org/openapi4j/parser/model/v3/RequestBody.class deleted file mode 100644 index 032b80af3dafad07bac4f451246a21394f93387d..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/RequestBody.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Response.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Response.class deleted file mode 100644 index 3ccf54b75e3edbf299a450168946730ba4432c9e..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Response.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Schema.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Schema.class deleted file mode 100644 index c8ac4817879176d96b465a61790b9fb260df569e..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Schema.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/SecurityRequirement.class b/build/classes/java/main/org/openapi4j/parser/model/v3/SecurityRequirement.class deleted file mode 100644 index 37ab9945ce9745781a28351d6f9bc074abd03396..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/SecurityRequirement.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/SecurityScheme.class b/build/classes/java/main/org/openapi4j/parser/model/v3/SecurityScheme.class deleted file mode 100644 index dd1c56bd7a0375424567e7b5c565bb674ec37162..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/SecurityScheme.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Server.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Server.class deleted file mode 100644 index 45384da805ca74ad38cde2795bf44ece0d43cfe0..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Server.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/ServerVariable.class b/build/classes/java/main/org/openapi4j/parser/model/v3/ServerVariable.class deleted file mode 100644 index 1a7535bfc39196b95fcdfdf46281a80924fccf8e..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/ServerVariable.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Tag.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Tag.class deleted file mode 100644 index 0bd5a5069cb7f1437766b568a77fb6af792375d7..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Tag.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/model/v3/Xml.class b/build/classes/java/main/org/openapi4j/parser/model/v3/Xml.class deleted file mode 100644 index 2c2aea32c4215c3750822b40e2b1094aa8939ad8..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/model/v3/Xml.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/ValidationContext.class b/build/classes/java/main/org/openapi4j/parser/validation/ValidationContext.class deleted file mode 100644 index 745768f26f142179fa7e59529b8624a1aaa5a56f..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/ValidationContext.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/Validator.class b/build/classes/java/main/org/openapi4j/parser/validation/Validator.class deleted file mode 100644 index 55747515948ebf42b18f2faee7cb1c97bdfc93d6..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/Validator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/ValidatorBase.class b/build/classes/java/main/org/openapi4j/parser/validation/ValidatorBase.class deleted file mode 100644 index aba9099bed6b2a4ef2ad99e1b0bb16256416180c..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/ValidatorBase.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/CallbackValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/CallbackValidator.class deleted file mode 100644 index adc6d36c9a7c5c4c747bd1892477f1efb196013d..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/CallbackValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/ComponentsValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/ComponentsValidator.class deleted file mode 100644 index 2fa49430649d82d5096076bb57e6f0a9358f13d7..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/ComponentsValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/ContactValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/ContactValidator.class deleted file mode 100644 index 944798ab7d845f9df9d7ba020840bbb6ffb8f7ef..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/ContactValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/DiscriminatorValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/DiscriminatorValidator.class deleted file mode 100644 index 7d6cd7debe7958838a6ae604548f251bbceb28e0..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/DiscriminatorValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/EncodingPropertyValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/EncodingPropertyValidator.class deleted file mode 100644 index 8edde393314cabefe69bcaa072f3c175fe3bc64d..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/EncodingPropertyValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/ExpressionValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/ExpressionValidator.class deleted file mode 100644 index bae958eb96c55f6e58b1cb95f2c3f15b6052465e..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/ExpressionValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/ExternalDocsValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/ExternalDocsValidator.class deleted file mode 100644 index 9a8fb57c866248a97acedaec2dd724a5b673675e..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/ExternalDocsValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/HeaderValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/HeaderValidator.class deleted file mode 100644 index f993c4ca2d07a371092b7fbda791face68c1dec7..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/HeaderValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/InfoValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/InfoValidator.class deleted file mode 100644 index d8d009d70fe3a429e383d4522792e0a637b3d6a9..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/InfoValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/LicenseValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/LicenseValidator.class deleted file mode 100644 index bfaf1da1da72572cef25253e784400bf3a228dd6..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/LicenseValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/LinkValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/LinkValidator.class deleted file mode 100644 index c0db78c11e301c3d21f72c12e83a501557ea6bb6..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/LinkValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/MediaTypeValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/MediaTypeValidator.class deleted file mode 100644 index e7da503690502c2c80e57e731dbbca025b50b714..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/MediaTypeValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/OAI3Keywords.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/OAI3Keywords.class deleted file mode 100644 index cc7a8f67d881c6ef5bfc08cdd1cdad7e4e4b82ae..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/OAI3Keywords.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/OAuthFlowValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/OAuthFlowValidator.class deleted file mode 100644 index 571a2174e15de5162f57a2f94b1706211bccabd5..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/OAuthFlowValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/OpenApi3Validator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/OpenApi3Validator.class deleted file mode 100644 index 053443b675c9c4a820402066cba9542d1d4ef892..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/OpenApi3Validator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/OpenApiValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/OpenApiValidator.class deleted file mode 100644 index f0d619027f237632490f8ed498d27b304f6f2b2e..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/OpenApiValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/OperationValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/OperationValidator.class deleted file mode 100644 index bea906f10db844b39a14f571341067259ee166bd..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/OperationValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/ParameterValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/ParameterValidator.class deleted file mode 100644 index 902156a0b7fe780ef876586d5fd3bd306b473216..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/ParameterValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/PathValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/PathValidator.class deleted file mode 100644 index a1fa5fe57d1e56497c8116ace9fd3957172013d4..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/PathValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/Regexes.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/Regexes.class deleted file mode 100644 index 9cdfc5f62cdaa25acbcb8c138cc9c51d390bd48f..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/Regexes.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/RequestBodyValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/RequestBodyValidator.class deleted file mode 100644 index b09e3fd1d515e5b14b9ee52280451d2dda6a73ad..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/RequestBodyValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/ResponseValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/ResponseValidator.class deleted file mode 100644 index 0773abe88b2e9d06b7290d9318a79b1ccb54291b..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/ResponseValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/SchemaValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/SchemaValidator.class deleted file mode 100644 index 9fe7aa42c6240599558a4af7338d7053e20742be..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/SchemaValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/SecurityRequirementValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/SecurityRequirementValidator.class deleted file mode 100644 index 19c17b3ae96a7c1390770d734a861b8de4468806..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/SecurityRequirementValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/SecuritySchemeValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/SecuritySchemeValidator.class deleted file mode 100644 index f9eb4e5b1a24d254a489b03d55142e7e9e1d6fa8..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/SecuritySchemeValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/ServerValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/ServerValidator.class deleted file mode 100644 index 0bc4c2466400780efef83246b17807b5ae030899..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/ServerValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/ServerVariableValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/ServerVariableValidator.class deleted file mode 100644 index c29fbc1753a64248b2bd91ff77785d11e0b6d240..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/ServerVariableValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/TagValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/TagValidator.class deleted file mode 100644 index 205cbc950998ddb29b1bde663ccbd4de507a6b57..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/TagValidator.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/Validator3Base.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/Validator3Base.class deleted file mode 100644 index ae72ee0fc1c4166f08ea57071c06dbb650aa57e4..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/Validator3Base.class and /dev/null differ diff --git a/build/classes/java/main/org/openapi4j/parser/validation/v3/XmlValidator.class b/build/classes/java/main/org/openapi4j/parser/validation/v3/XmlValidator.class deleted file mode 100644 index b5be8e12b259ab60bd853bee48c8ad3a00d1e700..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/org/openapi4j/parser/validation/v3/XmlValidator.class and /dev/null differ 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 1cd75caf07ee52c8cc106e9880d1f977ed4d345e..a6bbb356a5aa230f53c7260d38eeef89379db4d5 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 @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:94 - * @astdecl AdditionalProperties : ASTNode ::= SchemaObject; - * @production AdditionalProperties : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:110 + * @astdecl AdditionalProperties : ASTNode ::= SchemaOb; + * @production AdditionalProperties : {@link ASTNode} ::= <span class="component">{@link SchemaOb}</span>; */ public class AdditionalProperties extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class AdditionalProperties extends ASTNode<ASTNode> implements Cloneable * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"SchemaObject"}, - type = {"SchemaObject"}, + name = {"SchemaOb"}, + type = {"SchemaOb"}, kind = {"Child"} ) - public AdditionalProperties(SchemaObject p0) { + public AdditionalProperties(SchemaOb p0) { setChild(p0, 0); } /** @apilevel low-level @@ -157,30 +157,30 @@ public class AdditionalProperties extends ASTNode<ASTNode> implements Cloneable return super.is$Equal(node); } /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. + * Replaces the SchemaOb child. + * @param node The new node to replace the SchemaOb child. * @apilevel high-level */ - public void setSchemaObject(SchemaObject node) { + public void setSchemaOb(SchemaOb node) { setChild(node, 0); } /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. + * Retrieves the SchemaOb child. + * @return The current node used as the SchemaOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); + @ASTNodeAnnotation.Child(name="SchemaOb") + public SchemaOb getSchemaOb() { + return (SchemaOb) getChild(0); } /** - * Retrieves the SchemaObject child. + * Retrieves the SchemaOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. + * @return The current node used as the SchemaOb child. * @apilevel low-level */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); + public SchemaOb getSchemaObNoTransform() { + return (SchemaOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 6d9ac07bde5044259db6c27b9ef01810f5fffb31..d00a7c5bc93024ae6d14d020fc1b383fa1dab95e 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 @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:100 - * @astdecl AllOfSchema : ASTNode ::= SchemaObject; - * @production AllOfSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:116 + * @astdecl AllOfSchema : ASTNode ::= SchemaOb; + * @production AllOfSchema : {@link ASTNode} ::= <span class="component">{@link SchemaOb}</span>; */ public class AllOfSchema extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class AllOfSchema extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"SchemaObject"}, - type = {"SchemaObject"}, + name = {"SchemaOb"}, + type = {"SchemaOb"}, kind = {"Child"} ) - public AllOfSchema(SchemaObject p0) { + public AllOfSchema(SchemaOb p0) { setChild(p0, 0); } /** @apilevel low-level @@ -157,30 +157,30 @@ public class AllOfSchema extends ASTNode<ASTNode> implements Cloneable { return super.is$Equal(node); } /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. + * Replaces the SchemaOb child. + * @param node The new node to replace the SchemaOb child. * @apilevel high-level */ - public void setSchemaObject(SchemaObject node) { + public void setSchemaOb(SchemaOb node) { setChild(node, 0); } /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. + * Retrieves the SchemaOb child. + * @return The current node used as the SchemaOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); + @ASTNodeAnnotation.Child(name="SchemaOb") + public SchemaOb getSchemaOb() { + return (SchemaOb) getChild(0); } /** - * Retrieves the SchemaObject child. + * Retrieves the SchemaOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. + * @return The current node used as the SchemaOb child. * @apilevel low-level */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); + public SchemaOb getSchemaObNoTransform() { + return (SchemaOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 c06cebe8e8f163eb6c1fbf61dfd4fa0f06d91674..5000be9bc9940b2a5480f7c5240f823a0bf62251 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 @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:101 - * @astdecl AnyOfSchema : ASTNode ::= SchemaObject; - * @production AnyOfSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:117 + * @astdecl AnyOfSchema : ASTNode ::= SchemaOb; + * @production AnyOfSchema : {@link ASTNode} ::= <span class="component">{@link SchemaOb}</span>; */ public class AnyOfSchema extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class AnyOfSchema extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"SchemaObject"}, - type = {"SchemaObject"}, + name = {"SchemaOb"}, + type = {"SchemaOb"}, kind = {"Child"} ) - public AnyOfSchema(SchemaObject p0) { + public AnyOfSchema(SchemaOb p0) { setChild(p0, 0); } /** @apilevel low-level @@ -157,30 +157,30 @@ public class AnyOfSchema extends ASTNode<ASTNode> implements Cloneable { return super.is$Equal(node); } /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. + * Replaces the SchemaOb child. + * @param node The new node to replace the SchemaOb child. * @apilevel high-level */ - public void setSchemaObject(SchemaObject node) { + public void setSchemaOb(SchemaOb node) { setChild(node, 0); } /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. + * Retrieves the SchemaOb child. + * @return The current node used as the SchemaOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); + @ASTNodeAnnotation.Child(name="SchemaOb") + public SchemaOb getSchemaOb() { + return (SchemaOb) getChild(0); } /** - * Retrieves the SchemaObject child. + * Retrieves the SchemaOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. + * @return The current node used as the SchemaOb child. * @apilevel low-level */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); + public SchemaOb getSchemaObNoTransform() { + return (SchemaOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 74a5bd2bbd7ef0297636166bdfcc85c8dcdbae14..add49c0f874ea8b6b94d7031031ec3f11f0003c0 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:119 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:137 * @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/CallbackOb.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackOb.java new file mode 100644 index 0000000000000000000000000000000000000000..d5d4f9ba06119e9fb9f37ccb9654c10a68f8bfe8 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackOb.java @@ -0,0 +1,138 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:81 + * @astdecl CallbackOb : ASTNode; + * @production CallbackOb : {@link ASTNode}; + + */ +public abstract class CallbackOb extends ASTNode<ASTNode> implements Cloneable { + /** + * @aspect Composer + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:535 + */ + public static Callback composeCallback (CallbackObject callbackObject){ + Callback callback = new Callback(); + + if( callbackObject.getNumExpression() != 0 ){ + Map<String, Path> paths = new HashMap<>(); + for( Expression e : callbackObject.getExpressions() ) + paths.put( e.getName(), PathItem.composePath( e.getPathItem() )); + callback.setCallbackPaths(paths); + } + + return callback; + } + /** + * @aspect Parser + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:536 + */ + 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, PathItem.parsePath(callback.getCallbackPath(key)))); + } + + return callbackObject; + } + /** + * @declaredat ASTNode:1 + */ + public CallbackOb() { + 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 CallbackOb clone() throws CloneNotSupportedException { + CallbackOb node = (CallbackOb) 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 CallbackOb 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 CallbackOb 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 CallbackOb 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/CallbackObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObject.java index 8dfa951c25112cdb69d7f965ec8497389e33678d..5ffb40ec4d8c8a4e033062e0a771b3b041bab2b5 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 @@ -17,42 +17,12 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:75 - * @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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:83 + * @astdecl CallbackObject : CallbackOb ::= Expression* Extension*; + * @production CallbackObject : {@link CallbackOb} ::= <span class="component">{@link Expression}*</span> <span class="component">{@link Extension}*</span>; */ -public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:536 - */ - public static Callback composeCallback (CallbackObject callbackObject){ - Callback callback = new Callback(); - - if( callbackObject.getNumExpression() != 0 ){ - Map<String, Path> paths = new HashMap<>(); - for( Expression e : callbackObject.getExpressions() ) - paths.put( e.getName(), PathItem.composePath( e.getPathItem() )); - callback.setCallbackPaths(paths); - } - - return callback; - } - /** - * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:537 - */ - 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, PathItem.parsePath(callback.getCallbackPath(key)))); - } - - return callbackObject; - } +public class CallbackObject extends CallbackOb implements Cloneable { /** * @declaredat ASTNode:1 */ @@ -75,49 +45,48 @@ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:15 */ @ASTNodeAnnotation.Constructor( - name = {"Expression", "Extension", "Ref"}, - type = {"JastAddList<Expression>", "JastAddList<Extension>", "String"}, - kind = {"List", "List", "Token"} + name = {"Expression", "Extension"}, + type = {"JastAddList<Expression>", "JastAddList<Extension>"}, + kind = {"List", "List"} ) - public CallbackObject(JastAddList<Expression> p0, JastAddList<Extension> p1, String p2) { + public CallbackObject(JastAddList<Expression> p0, JastAddList<Extension> p1) { setChild(p0, 0); setChild(p1, 1); - setRef(p2); } /** @apilevel low-level - * @declaredat ASTNode:26 + * @declaredat ASTNode:25 */ protected int numChildren() { return 2; } /** * @apilevel internal - * @declaredat ASTNode:32 + * @declaredat ASTNode:31 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:36 + * @declaredat ASTNode:35 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:40 + * @declaredat ASTNode:39 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:44 + * @declaredat ASTNode:43 */ public CallbackObject clone() throws CloneNotSupportedException { CallbackObject node = (CallbackObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:49 + * @declaredat ASTNode:48 */ public CallbackObject copy() { try { @@ -137,7 +106,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:68 + * @declaredat ASTNode:67 */ @Deprecated public CallbackObject fullCopy() { @@ -148,7 +117,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:78 + * @declaredat ASTNode:77 */ public CallbackObject treeCopyNoTransform() { CallbackObject tree = (CallbackObject) copy(); @@ -169,7 +138,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:98 + * @declaredat ASTNode:97 */ public CallbackObject treeCopy() { CallbackObject tree = (CallbackObject) copy(); @@ -185,10 +154,10 @@ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:112 + * @declaredat ASTNode:111 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Ref == ((CallbackObject) node).tokenString_Ref); + return super.is$Equal(node); } /** * Replaces the Expression list. @@ -410,26 +379,6 @@ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { 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/CallbackReference.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackReference.java new file mode 100644 index 0000000000000000000000000000000000000000..8149b94a63aad8fdf7c0b398b2adaf1ce6c9afb4 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackReference.java @@ -0,0 +1,207 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:82 + * @astdecl CallbackReference : CallbackOb ::= <Ref:String> <CallbackObject:CallbackObject>; + * @production CallbackReference : {@link CallbackOb} ::= <span class="component"><Ref:String></span> <span class="component"><CallbackObject:CallbackObject></span>; + + */ +public class CallbackReference extends CallbackOb implements Cloneable { + /** + * @declaredat ASTNode:1 + */ + public CallbackReference() { + 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 = {"Ref", "CallbackObject"}, + type = {"String", "CallbackObject"}, + kind = {"Token", "Token"} + ) + public CallbackReference(String p0, CallbackObject p1) { + setRef(p0); + setCallbackObject(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 CallbackReference clone() throws CloneNotSupportedException { + CallbackReference node = (CallbackReference) super.clone(); + return node; + } + /** @apilevel internal + * @declaredat ASTNode:45 + */ + public CallbackReference copy() { + try { + CallbackReference node = (CallbackReference) 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 CallbackReference 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 CallbackReference treeCopyNoTransform() { + CallbackReference tree = (CallbackReference) 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 CallbackReference treeCopy() { + CallbackReference tree = (CallbackReference) 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_Ref == ((CallbackReference) node).tokenString_Ref) && (tokenCallbackObject_CallbackObject == ((CallbackReference) node).tokenCallbackObject_CallbackObject); + } + /** + * 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 : ""; + } + /** + * Replaces the lexeme CallbackObject. + * @param value The new value for the lexeme CallbackObject. + * @apilevel high-level + */ + public void setCallbackObject(CallbackObject value) { + tokenCallbackObject_CallbackObject = value; + } + /** @apilevel internal + */ + protected CallbackObject tokenCallbackObject_CallbackObject; + /** + * Retrieves the value for the lexeme CallbackObject. + * @return The value for the lexeme CallbackObject. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="CallbackObject") + public CallbackObject getCallbackObject() { + return tokenCallbackObject_CallbackObject; + } + /** @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/CallbackTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackTuple.java index 30ce8eeb5242bf5b82755b603347b8f9a0052088..770a8afa3380c9aa79040cf33a8e7a566501ebba 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackTuple.java @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:31 + * @astdecl CallbackTuple : ASTNode ::= <Key:String> CallbackOb; + * @production CallbackTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link CallbackOb}</span>; */ public class CallbackTuple extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class CallbackTuple extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Key", "CallbackObject"}, - type = {"String", "CallbackObject"}, + name = {"Key", "CallbackOb"}, + type = {"String", "CallbackOb"}, kind = {"Token", "Child"} ) - public CallbackTuple(String p0, CallbackObject p1) { + public CallbackTuple(String p0, CallbackOb p1) { setKey(p0); setChild(p1, 0); } @@ -178,30 +178,30 @@ public class CallbackTuple extends ASTNode<ASTNode> implements Cloneable { return tokenString_Key != null ? tokenString_Key : ""; } /** - * Replaces the CallbackObject child. - * @param node The new node to replace the CallbackObject child. + * Replaces the CallbackOb child. + * @param node The new node to replace the CallbackOb child. * @apilevel high-level */ - public void setCallbackObject(CallbackObject node) { + public void setCallbackOb(CallbackOb node) { setChild(node, 0); } /** - * Retrieves the CallbackObject child. - * @return The current node used as the CallbackObject child. + * Retrieves the CallbackOb child. + * @return The current node used as the CallbackOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="CallbackObject") - public CallbackObject getCallbackObject() { - return (CallbackObject) getChild(0); + @ASTNodeAnnotation.Child(name="CallbackOb") + public CallbackOb getCallbackOb() { + return (CallbackOb) getChild(0); } /** - * Retrieves the CallbackObject child. + * Retrieves the CallbackOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the CallbackObject child. + * @return The current node used as the CallbackOb child. * @apilevel low-level */ - public CallbackObject getCallbackObjectNoTransform() { - return (CallbackObject) getChildNoTransform(0); + public CallbackOb getCallbackObNoTransform() { + return (CallbackOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 ceb55ca78712b2daef2afecdf951e34504f16c46..ea2fd15781587d8ca9bdb92ca4457af7752a24ff 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:118 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:136 * @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 90fa8071bf8ec72674f267a926e5e6ee67617d10..8beb6dfcf1274a2fae9d79698e7840f5603cce21 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @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:22 * @astdecl ComponentsObject : ASTNode ::= SchemaTuple* ResponseTuple* ParameterTuple* ExampleTuple* RequestBodyTuple* HeaderTuple* SecuritySchemeTuple* LinkTuple* CallbackTuple* Extension*; * @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> <span class="component">{@link Extension}*</span>; @@ -25,7 +25,7 @@ import java.util.stream.IntStream; public class ComponentsObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:149 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:149 */ public static Components composeComponents (ComponentsObject componentsObject){ Components components = new Components(); @@ -151,7 +151,7 @@ public class ComponentsObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:121 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:121 */ public static ComponentsObject parseComponents(Components components){ ComponentsObject componentsObject = new ComponentsObject(); 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 6c98f1e3439df1496d7d574972dc5d50c653ab18..11eb786e7278c077364951a266e0445758b205a8 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:8 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:8 * @astdecl ContactObject : ASTNode ::= <Name:String> <Url:String> <Email:String> Extension*; * @production ContactObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Url:String></span> <span class="component"><Email:String></span> <span class="component">{@link Extension}*</span>; @@ -25,7 +25,7 @@ import java.util.stream.IntStream; public class ContactObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:85 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:85 */ public static Contact composeContact (ContactObject contactObject){ Contact contact = new Contact(); @@ -47,7 +47,7 @@ public class ContactObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:63 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:63 */ public static ContactObject parseContact(Contact contact){ ContactObject contactObject = new ContactObject(); 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 985396c3724a2dd517eb0045052ea9380ea31977..85398d86d9a069ab9fa42cee1244ccba58d94298 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:59 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:61 * @astdecl ContentTuple : ASTNode ::= <Key:String> MediaTypeObject; * @production ContentTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link MediaTypeObject}</span>; 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 6508a523c5f2f4e872580567dc2a8578198606b6..de1191497e6c24dd70cc5c14145ab91c19732a8d 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:42 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:44 * @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/DiscriminatorObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.java index 96edd43d03dfbe4930f1158a4563d6214ea0ce81..abb99a217c14acb7339b8e514aee98420ce4f2a8 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:105 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:121 * @astdecl DiscriminatorObject : ASTNode ::= <PropertyName:String> MappingTuple*; * @production DiscriminatorObject : {@link ASTNode} ::= <span class="component"><PropertyName:String></span> <span class="component">{@link MappingTuple}*</span>; @@ -25,7 +25,7 @@ import java.util.stream.IntStream; public class DiscriminatorObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:748 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:747 */ public static Discriminator composeDiscriminator (DiscriminatorObject discriminatorObject) { Discriminator discriminator = new Discriminator(); @@ -43,7 +43,7 @@ public class DiscriminatorObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:758 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:757 */ 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 6d7d43606fc2850df3b987837291829f920627d0..e7e84193e88125bbf43de132a3e988d4cf95faf9 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @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:73 * @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>; @@ -25,7 +25,7 @@ import java.util.stream.IntStream; public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:482 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:481 */ public static EncodingProperty composeEncodingProperty (EncodingObject encodingObject){ EncodingProperty encodingProperty = new EncodingProperty(); @@ -53,7 +53,7 @@ public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:493 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:492 */ public static EncodingObject parseEncoding(EncodingProperty encodingProperty){ EncodingObject encodingObject = new EncodingObject(); 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 ba92ce949f26e10f351fc36141a15bc88970461f..5c49815bfd78a742e70a6b6e518746049280daeb 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @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:70 * @astdecl EncodingTuple : ASTNode ::= <Key:String> EncodingObject; * @production EncodingTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link EncodingObject}</span>; 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 6587132fe133f1e821a1960a45cf0fdd94132d77..ff0ed8afc98751f125221aa8c270e0cbbee68084 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:19 + * @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 a7b51bc68b1092fce6ebcd6a316aba0791877277..73e17e8c9454168aac87d0be09bf0f19c1064703 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:95 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:111 * @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/ExampleOb.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleOb.java new file mode 100644 index 0000000000000000000000000000000000000000..aadaf1eb5f227a397f3c0b192dcbb6e7e5cb08f7 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleOb.java @@ -0,0 +1,154 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:88 + * @astdecl ExampleOb : ASTNode; + * @production ExampleOb : {@link ASTNode}; + + */ +public abstract class ExampleOb extends ASTNode<ASTNode> implements Cloneable { + /** + * @aspect Composer + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:548 + */ + public static Example composeExample (ExampleObject exampleObject){ + Example example = new Example(); + + if( !exampleObject.getSummary().isEmpty() ) + example.setSummary( exampleObject.getSummary() ); + if( !exampleObject.getDescription().isEmpty() ) + example.setDescription( exampleObject.getDescription() ); + if( exampleObject.getValue() != null ) + example.setValue( exampleObject.getValue() ); + if( !exampleObject.getExternalValue().isEmpty() ) + example.setExternalValue( exampleObject.getExternalValue() ); + if( exampleObject.getNumExtension() != 0 ){ + Map<String, Object> extension = new HashMap<>(); + for( Extension e : exampleObject.getExtensions() ) + extension.put(e.getKey(), e.getValue()); + example.setExtensions(extension); + } + + return example; + } + /** + * @aspect Parser + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:547 + */ + public static ExampleObject parseExample(Example example){ + ExampleObject exampleObject = new ExampleObject(); + + if( example.getSummary() != null ) + exampleObject.setSummary( example.getSummary() ); + if( example.getDescription() != null ) + exampleObject.setDescription( example.getDescription() ); + if( example.getValue() != null ) + exampleObject.setValue( example.getValue() ); + if( example.getExternalValue() != null ) + exampleObject.setExternalValue( example.getExternalValue() ); + if( example.getExtensions() != null ){ + for( String key : example.getExtensions().keySet() ) + exampleObject.addExtension(new Extension(key, example.getExtensions().get(key))); + } + + return exampleObject; + } + /** + * @declaredat ASTNode:1 + */ + public ExampleOb() { + 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 ExampleOb clone() throws CloneNotSupportedException { + ExampleOb node = (ExampleOb) 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 ExampleOb 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 ExampleOb 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 ExampleOb 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/ExampleObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObject.java index af82b2c0bd4f1829827d7657193563060d1377be..952454824a1d4f5a28bbbead77f3d0edcdb2f904 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 @@ -17,58 +17,12 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:80 - * @astdecl ExampleObject : ASTNode ::= <Summary:String> <Description:String> <Value:Object> <ExternalValue:String> Extension*; - * @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> <span class="component">{@link Extension}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:90 + * @astdecl ExampleObject : ExampleOb ::= <Summary:String> <Description:String> <Value:Object> <ExternalValue:String> Extension*; + * @production ExampleObject : {@link ExampleOb} ::= <span class="component"><Summary:String></span> <span class="component"><Description:String></span> <span class="component"><Value:Object></span> <span class="component"><ExternalValue:String></span> <span class="component">{@link Extension}*</span>; */ -public class ExampleObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:549 - */ - public static Example composeExample (ExampleObject exampleObject){ - Example example = new Example(); - - if( !exampleObject.getSummary().isEmpty() ) - example.setSummary( exampleObject.getSummary() ); - if( !exampleObject.getDescription().isEmpty() ) - example.setDescription( exampleObject.getDescription() ); - if( exampleObject.getValue() != null ) - example.setValue( exampleObject.getValue() ); - if( !exampleObject.getExternalValue().isEmpty() ) - example.setExternalValue( exampleObject.getExternalValue() ); - if( exampleObject.getNumExtension() != 0 ){ - Map<String, Object> extension = new HashMap<>(); - for( Extension e : exampleObject.getExtensions() ) - extension.put(e.getKey(), e.getValue()); - example.setExtensions(extension); - } - - return example; - } - /** - * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:548 - */ - public static ExampleObject parseExample(Example example){ - ExampleObject exampleObject = new ExampleObject(); - - if( example.getSummary() != null ) - exampleObject.setSummary( example.getSummary() ); - if( example.getDescription() != null ) - exampleObject.setDescription( example.getDescription() ); - if( example.getValue() != null ) - exampleObject.setValue( example.getValue() ); - if( example.getExternalValue() != null ) - exampleObject.setExternalValue( example.getExternalValue() ); - if( example.getExtensions() != null ){ - for( String key : example.getExtensions().keySet() ) - exampleObject.addExtension(new Extension(key, example.getExtensions().get(key))); - } - - return exampleObject; - } +public class ExampleObject extends ExampleOb implements Cloneable { /** * @declaredat ASTNode:1 */ diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleReference.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleReference.java new file mode 100644 index 0000000000000000000000000000000000000000..0539cb70ff786d09ca9355188dbe45dc9d4a807b --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleReference.java @@ -0,0 +1,207 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:89 + * @astdecl ExampleReference : ExampleOb ::= <Ref:String> <ExampleObject:ExampleObject>; + * @production ExampleReference : {@link ExampleOb} ::= <span class="component"><Ref:String></span> <span class="component"><ExampleObject:ExampleObject></span>; + + */ +public class ExampleReference extends ExampleOb implements Cloneable { + /** + * @declaredat ASTNode:1 + */ + public ExampleReference() { + 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 = {"Ref", "ExampleObject"}, + type = {"String", "ExampleObject"}, + kind = {"Token", "Token"} + ) + public ExampleReference(String p0, ExampleObject p1) { + setRef(p0); + setExampleObject(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 ExampleReference clone() throws CloneNotSupportedException { + ExampleReference node = (ExampleReference) super.clone(); + return node; + } + /** @apilevel internal + * @declaredat ASTNode:45 + */ + public ExampleReference copy() { + try { + ExampleReference node = (ExampleReference) 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 ExampleReference 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 ExampleReference treeCopyNoTransform() { + ExampleReference tree = (ExampleReference) 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 ExampleReference treeCopy() { + ExampleReference tree = (ExampleReference) 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_Ref == ((ExampleReference) node).tokenString_Ref) && (tokenExampleObject_ExampleObject == ((ExampleReference) node).tokenExampleObject_ExampleObject); + } + /** + * 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 : ""; + } + /** + * Replaces the lexeme ExampleObject. + * @param value The new value for the lexeme ExampleObject. + * @apilevel high-level + */ + public void setExampleObject(ExampleObject value) { + tokenExampleObject_ExampleObject = value; + } + /** @apilevel internal + */ + protected ExampleObject tokenExampleObject_ExampleObject; + /** + * Retrieves the value for the lexeme ExampleObject. + * @return The value for the lexeme ExampleObject. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="ExampleObject") + public ExampleObject getExampleObject() { + return tokenExampleObject_ExampleObject; + } + /** @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/ExampleTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleTuple.java index 743668627fafff036f45af3851c76e3fed9366a8..24826a3bc9e98329e802ceb00cdab54a73fce964 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleTuple.java @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:26 + * @astdecl ExampleTuple : ASTNode ::= <Key:String> ExampleOb; + * @production ExampleTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link ExampleOb}</span>; */ public class ExampleTuple extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class ExampleTuple extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Key", "ExampleObject"}, - type = {"String", "ExampleObject"}, + name = {"Key", "ExampleOb"}, + type = {"String", "ExampleOb"}, kind = {"Token", "Child"} ) - public ExampleTuple(String p0, ExampleObject p1) { + public ExampleTuple(String p0, ExampleOb p1) { setKey(p0); setChild(p1, 0); } @@ -178,30 +178,30 @@ public class ExampleTuple extends ASTNode<ASTNode> implements Cloneable { return tokenString_Key != null ? tokenString_Key : ""; } /** - * Replaces the ExampleObject child. - * @param node The new node to replace the ExampleObject child. + * Replaces the ExampleOb child. + * @param node The new node to replace the ExampleOb child. * @apilevel high-level */ - public void setExampleObject(ExampleObject node) { + public void setExampleOb(ExampleOb node) { setChild(node, 0); } /** - * Retrieves the ExampleObject child. - * @return The current node used as the ExampleObject child. + * Retrieves the ExampleOb child. + * @return The current node used as the ExampleOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="ExampleObject") - public ExampleObject getExampleObject() { - return (ExampleObject) getChild(0); + @ASTNodeAnnotation.Child(name="ExampleOb") + public ExampleOb getExampleOb() { + return (ExampleOb) getChild(0); } /** - * Retrieves the ExampleObject child. + * Retrieves the ExampleOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the ExampleObject child. + * @return The current node used as the ExampleOb child. * @apilevel low-level */ - public ExampleObject getExampleObjectNoTransform() { - return (ExampleObject) getChildNoTransform(0); + public ExampleOb getExampleObNoTransform() { + return (ExampleOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 32a1592a47c72fda06ad5dbf03bfa857f3e877c0..b2cb3c15274dd1089d3be8bf4fa8983a36843c8c 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 @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:76 - * @astdecl Expression : ASTNode ::= <Name:String> PathItem; - * @production Expression : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component">{@link PathItem}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:84 + * @astdecl Expression : ASTNode ::= <Name:String> PathItemOb; + * @production Expression : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component">{@link PathItemOb}</span>; */ public class Expression extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class Expression extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "PathItem"}, - type = {"String", "PathItem"}, + name = {"Name", "PathItemOb"}, + type = {"String", "PathItemOb"}, kind = {"Token", "Child"} ) - public Expression(String p0, PathItem p1) { + public Expression(String p0, PathItemOb p1) { setName(p0); setChild(p1, 0); } @@ -178,30 +178,30 @@ public class Expression extends ASTNode<ASTNode> implements Cloneable { return tokenString_Name != null ? tokenString_Name : ""; } /** - * Replaces the PathItem child. - * @param node The new node to replace the PathItem child. + * Replaces the PathItemOb child. + * @param node The new node to replace the PathItemOb child. * @apilevel high-level */ - public void setPathItem(PathItem node) { + public void setPathItemOb(PathItemOb node) { setChild(node, 0); } /** - * Retrieves the PathItem child. - * @return The current node used as the PathItem child. + * Retrieves the PathItemOb child. + * @return The current node used as the PathItemOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="PathItem") - public PathItem getPathItem() { - return (PathItem) getChild(0); + @ASTNodeAnnotation.Child(name="PathItemOb") + public PathItemOb getPathItemOb() { + return (PathItemOb) getChild(0); } /** - * Retrieves the PathItem child. + * Retrieves the PathItemOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the PathItem child. + * @return The current node used as the PathItemOb child. * @apilevel low-level */ - public PathItem getPathItemNoTransform() { - return (PathItem) getChildNoTransform(0); + public PathItemOb getPathItemObNoTransform() { + return (PathItemOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/Extension.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Extension.java index c8c2dc2979c15bc4daa42d0e714abca288fdd4df..4a34bde0202e08a898245fb6469174dd9b0454d7 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/Extension.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/Extension.java @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @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:85 * @astdecl Extension : ASTNode ::= <Key:String> <Value:Object>; * @production Extension : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component"><Value:Object></span>; 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 index b7230d3fa228c97b8babd37e52aac0686b0fb686..bfa3078de5453d2fb4bec8987d671fc13b8d247c 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocObject.java @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:53 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:55 * @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>; @@ -25,7 +25,7 @@ import java.util.stream.IntStream; public class ExternalDocObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:374 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:373 */ public static ExternalDocs composeExternalDocs (ExternalDocObject externalDocObject){ ExternalDocs externalDocs = new ExternalDocs(); @@ -45,7 +45,7 @@ public class ExternalDocObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:400 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:399 */ public static ExternalDocObject parseExternalDocs(ExternalDocs externalDocs){ ExternalDocObject externalDocObject = new ExternalDocObject(); 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 39663c2db8b4f2a632805255b4f54f12ed5eeb39..507e3ad54d0ee48ed18d12b045574b5eb477bb03 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:39 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:41 * @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/Head.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/Head.java index 37853b5684bd0f59b936a74e260003bf9b0d85bf..2f5fe0beafb52c7ff4fb81105d377832553f20ca 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:44 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:46 * @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/HeaderOb.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderOb.java new file mode 100644 index 0000000000000000000000000000000000000000..4b68fbbefbb82033bf5a288d36ce29afa5b4481d --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderOb.java @@ -0,0 +1,182 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:99 + * @astdecl HeaderOb : ASTNode; + * @production HeaderOb : {@link ASTNode}; + + */ +public abstract class HeaderOb extends ASTNode<ASTNode> implements Cloneable { + /** + * @aspect Composer + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:592 + */ + public static Header composeHeader (HeaderObject headerObject){ + Header header = new Header(); + + if( !headerObject.getRef().isEmpty() ) + header.setRef(headerObject.getRef()); + if( headerObject.getRequired() != null ) + header.setRequired(headerObject.getRequired()); + if( !headerObject.getDescription().isEmpty() ) + header.setDescription( headerObject.getDescription() ); + if( !headerObject.getStyle().isEmpty() ) + header.setStyle(headerObject.getStyle()); + if( headerObject.getExplode() != null ) + header.setExplode(headerObject.getExplode()); + if( headerObject.getAllowReserved() != null ) + header.setAllowReserved(headerObject.getAllowReserved()); + if( headerObject.getExample() != null ) + header.setExample(headerObject.getExample()); + if( headerObject.getNumExampleTuple() != 0 ){ + Map<String, Example> examples = new HashMap<>(); + 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(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); + header.setContentMediaTypes(contents); + } + if( headerObject.hasSchemaObject() ) + header.setSchema(SchemaObject.composeSchema(headerObject.getSchemaObject())); + + return header; + } + /** + * @aspect Parser + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:587 + */ + public static HeaderObject parseHeader(Header header){ + HeaderObject headerObject = new HeaderObject(); + + if( header.isRef() ) + headerObject.setRef(header.getRef()); + if( header.getRequired() != null ) + headerObject.setRequired( header.getRequired() ); + if( header.getDescription() != null ) + headerObject.setDescription( header.getDescription() ); + if( header.getDeprecated() != null ) + headerObject.setDeprecatedBoolean( header.getDeprecated() ); + if( header.getStyle() != null ) + headerObject.setStyle( header.getStyle() ); + if( header.getExplode() != null ) + headerObject.setExplode( header.getExplode() ); + if( header.getAllowReserved() != null ) + headerObject.setExplode( header.getAllowReserved() ); + if( header.getExample() != null ) + headerObject.setExample( header.getExample() ); + if( header.getExamples() != null ){ + for( String key : header.getExamples().keySet() ) + headerObject.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(header.getExample(key)))); + } + if( header.getContentMediaTypes() != null ){ + for( String key : header.getContentMediaTypes().keySet() ) + headerObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(header.getContentMediaType(key)))); + } + if( header.getSchema() != null ) + headerObject.setSchemaObject(SchemaObject.parseSchema(header.getSchema())); + + return headerObject; + } + /** + * @declaredat ASTNode:1 + */ + public HeaderOb() { + 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 HeaderOb clone() throws CloneNotSupportedException { + HeaderOb node = (HeaderOb) 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 HeaderOb 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 HeaderOb 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 HeaderOb 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/HeaderObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObject.java index 79a75245cff3a0f31cf448e3d89fd86f6f5a67aa..cd1e963dca76ffb185b72eab3340646397027679 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 @@ -17,86 +17,12 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:87 - * @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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:101 + * @astdecl HeaderObject : HeaderOb ::= <Description:String> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style:String> <Explode:Boolean> <AllowReserved:Boolean> [SchemaOb] <Example:Object> ExampleTuple* ContentTuple* Extension*; + * @production HeaderObject : {@link HeaderOb} ::= <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 SchemaOb}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component">{@link Extension}*</span>; */ -public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:593 - */ - public static Header composeHeader (HeaderObject headerObject){ - Header header = new Header(); - - if( !headerObject.getRef().isEmpty() ) - header.setRef(headerObject.getRef()); - if( headerObject.getRequired() != null ) - header.setRequired(headerObject.getRequired()); - if( !headerObject.getDescription().isEmpty() ) - header.setDescription( headerObject.getDescription() ); - if( !headerObject.getStyle().isEmpty() ) - header.setStyle(headerObject.getStyle()); - if( headerObject.getExplode() != null ) - header.setExplode(headerObject.getExplode()); - if( headerObject.getAllowReserved() != null ) - header.setAllowReserved(headerObject.getAllowReserved()); - if( headerObject.getExample() != null ) - header.setExample(headerObject.getExample()); - if( headerObject.getNumExampleTuple() != 0 ){ - Map<String, Example> examples = new HashMap<>(); - 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(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:588 - */ - public static HeaderObject parseHeader(Header header){ - HeaderObject headerObject = new HeaderObject(); - - if( header.isRef() ) - headerObject.setRef(header.getRef()); - if( header.getRequired() != null ) - headerObject.setRequired( header.getRequired() ); - if( header.getDescription() != null ) - headerObject.setDescription( header.getDescription() ); - if( header.getDeprecated() != null ) - headerObject.setDeprecatedBoolean( header.getDeprecated() ); - if( header.getStyle() != null ) - headerObject.setStyle( header.getStyle() ); - if( header.getExplode() != null ) - headerObject.setExplode( header.getExplode() ); - if( header.getAllowReserved() != null ) - headerObject.setExplode( header.getAllowReserved() ); - if( header.getExample() != null ) - headerObject.setExample( header.getExample() ); - if( header.getExamples() != null ){ - for( String key : header.getExamples().keySet() ) - headerObject.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(header.getExample(key)))); - } - if( header.getContentMediaTypes() != null ){ - for( String key : header.getContentMediaTypes().keySet() ) - headerObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(header.getContentMediaType(key)))); - } - if( header.getSchema() != null ) - headerObject.setSchemaObject(SchemaObject.parseSchema(header.getSchema())); - - return headerObject; - } +public class HeaderObject extends HeaderOb implements Cloneable { /** * @declaredat ASTNode:1 */ @@ -111,20 +37,21 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[3]; + children = new ASTNode[4]; setChild(new Opt(), 0); setChild(new JastAddList(), 1); setChild(new JastAddList(), 2); + setChild(new JastAddList(), 3); } /** - * @declaredat ASTNode:16 + * @declaredat ASTNode:17 */ @ASTNodeAnnotation.Constructor( - 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"} + name = {"Description", "Required", "DeprecatedBoolean", "AllowEmptyValue", "Style", "Explode", "AllowReserved", "SchemaOb", "Example", "ExampleTuple", "ContentTuple", "Extension"}, + type = {"String", "Boolean", "Boolean", "Boolean", "String", "Boolean", "Boolean", "Opt<SchemaOb>", "Object", "JastAddList<ExampleTuple>", "JastAddList<ContentTuple>", "JastAddList<Extension>"}, + kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "List", "List", "List"} ) - 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) { + public HeaderObject(String p0, Boolean p1, Boolean p2, Boolean p3, String p4, Boolean p5, Boolean p6, Opt<SchemaOb> p7, Object p8, JastAddList<ExampleTuple> p9, JastAddList<ContentTuple> p10, JastAddList<Extension> p11) { setDescription(p0); setRequired(p1); setDeprecatedBoolean(p2); @@ -136,42 +63,42 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { setExample(p8); setChild(p9, 1); setChild(p10, 2); - setRef(p11); + setChild(p11, 3); } /** @apilevel low-level - * @declaredat ASTNode:36 + * @declaredat ASTNode:37 */ protected int numChildren() { - return 3; + return 4; } /** * @apilevel internal - * @declaredat ASTNode:42 + * @declaredat ASTNode:43 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:46 + * @declaredat ASTNode:47 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:50 + * @declaredat ASTNode:51 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:54 + * @declaredat ASTNode:55 */ public HeaderObject clone() throws CloneNotSupportedException { HeaderObject node = (HeaderObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:59 + * @declaredat ASTNode:60 */ public HeaderObject copy() { try { @@ -191,7 +118,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:78 + * @declaredat ASTNode:79 */ @Deprecated public HeaderObject fullCopy() { @@ -202,7 +129,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:88 + * @declaredat ASTNode:89 */ public HeaderObject treeCopyNoTransform() { HeaderObject tree = (HeaderObject) copy(); @@ -223,7 +150,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:108 + * @declaredat ASTNode:109 */ public HeaderObject treeCopy() { HeaderObject tree = (HeaderObject) copy(); @@ -239,10 +166,10 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:122 + * @declaredat ASTNode:123 */ protected boolean is$Equal(ASTNode node) { - 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); + 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); } /** * Replaces the lexeme Description. @@ -385,55 +312,55 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { return tokenBoolean_AllowReserved; } /** - * Replaces the optional node for the SchemaObject child. This is the <code>Opt</code> - * node containing the child SchemaObject, not the actual child! - * @param opt The new node to be used as the optional node for the SchemaObject child. + * Replaces the optional node for the SchemaOb child. This is the <code>Opt</code> + * node containing the child SchemaOb, not the actual child! + * @param opt The new node to be used as the optional node for the SchemaOb child. * @apilevel low-level */ - public void setSchemaObjectOpt(Opt<SchemaObject> opt) { + public void setSchemaObOpt(Opt<SchemaOb> opt) { setChild(opt, 0); } /** - * Replaces the (optional) SchemaObject child. - * @param node The new node to be used as the SchemaObject child. + * Replaces the (optional) SchemaOb child. + * @param node The new node to be used as the SchemaOb child. * @apilevel high-level */ - public void setSchemaObject(SchemaObject node) { - getSchemaObjectOpt().setChild(node, 0); + public void setSchemaOb(SchemaOb node) { + getSchemaObOpt().setChild(node, 0); } /** - * Check whether the optional SchemaObject child exists. - * @return {@code true} if the optional SchemaObject child exists, {@code false} if it does not. + * Check whether the optional SchemaOb child exists. + * @return {@code true} if the optional SchemaOb child exists, {@code false} if it does not. * @apilevel high-level */ - public boolean hasSchemaObject() { - return getSchemaObjectOpt().getNumChild() != 0; + public boolean hasSchemaOb() { + return getSchemaObOpt().getNumChild() != 0; } /** - * Retrieves the (optional) SchemaObject child. - * @return The SchemaObject child, if it exists. Returns {@code null} otherwise. + * Retrieves the (optional) SchemaOb child. + * @return The SchemaOb child, if it exists. Returns {@code null} otherwise. * @apilevel low-level */ - public SchemaObject getSchemaObject() { - return (SchemaObject) getSchemaObjectOpt().getChild(0); + public SchemaOb getSchemaOb() { + return (SchemaOb) getSchemaObOpt().getChild(0); } /** - * Retrieves the optional node for the SchemaObject child. This is the <code>Opt</code> node containing the child SchemaObject, not the actual child! - * @return The optional node for child the SchemaObject child. + * Retrieves the optional node for the SchemaOb child. This is the <code>Opt</code> node containing the child SchemaOb, not the actual child! + * @return The optional node for child the SchemaOb child. * @apilevel low-level */ - @ASTNodeAnnotation.OptChild(name="SchemaObject") - public Opt<SchemaObject> getSchemaObjectOpt() { - return (Opt<SchemaObject>) getChild(0); + @ASTNodeAnnotation.OptChild(name="SchemaOb") + public Opt<SchemaOb> getSchemaObOpt() { + return (Opt<SchemaOb>) getChild(0); } /** - * Retrieves the optional node for child SchemaObject. This is the <code>Opt</code> node containing the child SchemaObject, not the actual child! + * Retrieves the optional node for child SchemaOb. This is the <code>Opt</code> node containing the child SchemaOb, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child SchemaObject. + * @return The optional node for child SchemaOb. * @apilevel low-level */ - public Opt<SchemaObject> getSchemaObjectOptNoTransform() { - return (Opt<SchemaObject>) getChildNoTransform(0); + public Opt<SchemaOb> getSchemaObOptNoTransform() { + return (Opt<SchemaOb>) getChildNoTransform(0); } /** * Replaces the lexeme Example. @@ -676,24 +603,114 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { return getContentTupleListNoTransform(); } /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. + * Replaces the Extension list. + * @param list The new list node to be used as the Extension list. * @apilevel high-level */ - public void setRef(String value) { - tokenString_Ref = value; + public void setExtensionList(JastAddList<Extension> list) { + setChild(list, 3); } - /** @apilevel internal + /** + * 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 */ - protected String tokenString_Ref; + @ASTNodeAnnotation.ListChild(name="Extension") + public JastAddList<Extension> getExtensionList() { + JastAddList<Extension> list = (JastAddList<Extension>) getChild(3); + return list; + } /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. + * 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(3); + } + /** + * @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 */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; + 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/HeaderReference.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderReference.java new file mode 100644 index 0000000000000000000000000000000000000000..7d00813bd08b336fe7a9ed2ce8e97358b1c70264 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderReference.java @@ -0,0 +1,207 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:100 + * @astdecl HeaderReference : HeaderOb ::= <Ref:String> <HeaderObject:HeaderObject>; + * @production HeaderReference : {@link HeaderOb} ::= <span class="component"><Ref:String></span> <span class="component"><HeaderObject:HeaderObject></span>; + + */ +public class HeaderReference extends HeaderOb implements Cloneable { + /** + * @declaredat ASTNode:1 + */ + public HeaderReference() { + 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 = {"Ref", "HeaderObject"}, + type = {"String", "HeaderObject"}, + kind = {"Token", "Token"} + ) + public HeaderReference(String p0, HeaderObject p1) { + setRef(p0); + setHeaderObject(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 HeaderReference clone() throws CloneNotSupportedException { + HeaderReference node = (HeaderReference) super.clone(); + return node; + } + /** @apilevel internal + * @declaredat ASTNode:45 + */ + public HeaderReference copy() { + try { + HeaderReference node = (HeaderReference) 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 HeaderReference 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 HeaderReference treeCopyNoTransform() { + HeaderReference tree = (HeaderReference) 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 HeaderReference treeCopy() { + HeaderReference tree = (HeaderReference) 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_Ref == ((HeaderReference) node).tokenString_Ref) && (tokenHeaderObject_HeaderObject == ((HeaderReference) node).tokenHeaderObject_HeaderObject); + } + /** + * 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 : ""; + } + /** + * Replaces the lexeme HeaderObject. + * @param value The new value for the lexeme HeaderObject. + * @apilevel high-level + */ + public void setHeaderObject(HeaderObject value) { + tokenHeaderObject_HeaderObject = value; + } + /** @apilevel internal + */ + protected HeaderObject tokenHeaderObject_HeaderObject; + /** + * Retrieves the value for the lexeme HeaderObject. + * @return The value for the lexeme HeaderObject. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="HeaderObject") + public HeaderObject getHeaderObject() { + return tokenHeaderObject_HeaderObject; + } + /** @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/HeaderTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderTuple.java index 6cb06580a040b2d3e3ecf2e9a62f4917ed9de27c..153326727a20e71d53474b79b5aec940495fe2cb 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderTuple.java @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:28 + * @astdecl HeaderTuple : ASTNode ::= <Key:String> HeaderOb; + * @production HeaderTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link HeaderOb}</span>; */ public class HeaderTuple extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class HeaderTuple extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Key", "HeaderObject"}, - type = {"String", "HeaderObject"}, + name = {"Key", "HeaderOb"}, + type = {"String", "HeaderOb"}, kind = {"Token", "Child"} ) - public HeaderTuple(String p0, HeaderObject p1) { + public HeaderTuple(String p0, HeaderOb p1) { setKey(p0); setChild(p1, 0); } @@ -178,30 +178,30 @@ public class HeaderTuple extends ASTNode<ASTNode> implements Cloneable { return tokenString_Key != null ? tokenString_Key : ""; } /** - * Replaces the HeaderObject child. - * @param node The new node to replace the HeaderObject child. + * Replaces the HeaderOb child. + * @param node The new node to replace the HeaderOb child. * @apilevel high-level */ - public void setHeaderObject(HeaderObject node) { + public void setHeaderOb(HeaderOb node) { setChild(node, 0); } /** - * Retrieves the HeaderObject child. - * @return The current node used as the HeaderObject child. + * Retrieves the HeaderOb child. + * @return The current node used as the HeaderOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="HeaderObject") - public HeaderObject getHeaderObject() { - return (HeaderObject) getChild(0); + @ASTNodeAnnotation.Child(name="HeaderOb") + public HeaderOb getHeaderOb() { + return (HeaderOb) getChild(0); } /** - * Retrieves the HeaderObject child. + * Retrieves the HeaderOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the HeaderObject child. + * @return The current node used as the HeaderOb child. * @apilevel low-level */ - public HeaderObject getHeaderObjectNoTransform() { - return (HeaderObject) getChildNoTransform(0); + public HeaderOb getHeaderObNoTransform() { + return (HeaderOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 98e0a809e4adcf1f8478c3d68a6672f11039e922..b93ed28a2ca7e51e05dfc818f9508d7d6deba41a 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @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:134 * @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 0c32ee772a8a4c0005f1ff5f708465a9349cd885..075227381ac63cf2ce39e0fa6843a519d270b511 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:5 + * @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> Extension*; * @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> <span class="component">{@link Extension}*</span>; @@ -25,7 +25,7 @@ import java.util.stream.IntStream; public class InfoObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:60 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:60 */ public static Info composeInfo (InfoObject infoObject){ Info info = new Info(); @@ -53,7 +53,7 @@ public class InfoObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:40 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:40 */ public static InfoObject parseInfo(Info info) { InfoObject infoObject = new 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 04742d83268b81ca20f63cb32040a61ceafa8a0c..4f62e1c82f05f4766f61aaa6155547f00a1ff215 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 @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:96 - * @astdecl ItemsSchema : ASTNode ::= SchemaObject; - * @production ItemsSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:112 + * @astdecl ItemsSchema : ASTNode ::= SchemaOb; + * @production ItemsSchema : {@link ASTNode} ::= <span class="component">{@link SchemaOb}</span>; */ public class ItemsSchema extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class ItemsSchema extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"SchemaObject"}, - type = {"SchemaObject"}, + name = {"SchemaOb"}, + type = {"SchemaOb"}, kind = {"Child"} ) - public ItemsSchema(SchemaObject p0) { + public ItemsSchema(SchemaOb p0) { setChild(p0, 0); } /** @apilevel low-level @@ -157,30 +157,30 @@ public class ItemsSchema extends ASTNode<ASTNode> implements Cloneable { return super.is$Equal(node); } /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. + * Replaces the SchemaOb child. + * @param node The new node to replace the SchemaOb child. * @apilevel high-level */ - public void setSchemaObject(SchemaObject node) { + public void setSchemaOb(SchemaOb node) { setChild(node, 0); } /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. + * Retrieves the SchemaOb child. + * @return The current node used as the SchemaOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); + @ASTNodeAnnotation.Child(name="SchemaOb") + public SchemaOb getSchemaOb() { + return (SchemaOb) getChild(0); } /** - * Retrieves the SchemaObject child. + * Retrieves the SchemaOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. + * @return The current node used as the SchemaOb child. * @apilevel low-level */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); + public SchemaOb getSchemaObNoTransform() { + return (SchemaOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 d7d8fabaaa9342d508a4cfbc709bc4f99554de9e..211819fb35096b274a6ba25d2faabf6161580841 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 @@ -17,15 +17,15 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:11 + * @astdecl LicenseObject : ASTNode ::= <Name:String> <Url:String> Extension*; + * @production LicenseObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Url:String></span> <span class="component">{@link Extension}*</span>; */ public class LicenseObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:104 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:104 */ public static License composeLicense (LicenseObject licenseObject){ License license = new License(); @@ -39,7 +39,7 @@ public class LicenseObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:80 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:80 */ public static LicenseObject parseLicense(License license){ LicenseObject licenseObject = new LicenseObject(); @@ -65,53 +65,56 @@ public class LicenseObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { + children = new ASTNode[1]; + setChild(new JastAddList(), 0); } /** - * @declaredat ASTNode:12 + * @declaredat ASTNode:14 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "Url"}, - type = {"String", "String"}, - kind = {"Token", "Token"} + name = {"Name", "Url", "Extension"}, + type = {"String", "String", "JastAddList<Extension>"}, + kind = {"Token", "Token", "List"} ) - public LicenseObject(String p0, String p1) { + public LicenseObject(String p0, String p1, JastAddList<Extension> p2) { setName(p0); setUrl(p1); + setChild(p2, 0); } /** @apilevel low-level - * @declaredat ASTNode:22 + * @declaredat ASTNode:25 */ protected int numChildren() { - return 0; + return 1; } /** * @apilevel internal - * @declaredat ASTNode:28 + * @declaredat ASTNode:31 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:32 + * @declaredat ASTNode:35 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:36 + * @declaredat ASTNode:39 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:40 + * @declaredat ASTNode:43 */ public LicenseObject clone() throws CloneNotSupportedException { LicenseObject node = (LicenseObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:45 + * @declaredat ASTNode:48 */ public LicenseObject copy() { try { @@ -131,7 +134,7 @@ public class LicenseObject 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:64 + * @declaredat ASTNode:67 */ @Deprecated public LicenseObject fullCopy() { @@ -142,7 +145,7 @@ public class LicenseObject 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:74 + * @declaredat ASTNode:77 */ public LicenseObject treeCopyNoTransform() { LicenseObject tree = (LicenseObject) copy(); @@ -163,7 +166,7 @@ public class LicenseObject 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:94 + * @declaredat ASTNode:97 */ public LicenseObject treeCopy() { LicenseObject tree = (LicenseObject) copy(); @@ -179,7 +182,7 @@ public class LicenseObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:108 + * @declaredat ASTNode:111 */ protected boolean is$Equal(ASTNode node) { return super.is$Equal(node) && (tokenString_Name == ((LicenseObject) node).tokenString_Name) && (tokenString_Url == ((LicenseObject) node).tokenString_Url); @@ -224,6 +227,116 @@ public class LicenseObject extends ASTNode<ASTNode> implements Cloneable { 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(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkOb.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkOb.java new file mode 100644 index 0000000000000000000000000000000000000000..f957c3a591c83274fb6253fe0a30328c9237e004 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkOb.java @@ -0,0 +1,158 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:93 + * @astdecl LinkOb : ASTNode; + * @production LinkOb : {@link ASTNode}; + + */ +public abstract class LinkOb extends ASTNode<ASTNode> implements Cloneable { + /** + * @aspect Composer + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:569 + */ + public static Link composeLink (LinkObject linkObject){ + Link link = new Link(); + + if( !linkObject.getRef().isEmpty() ) + link.setRef(linkObject.getRef()); + if( !linkObject.getOperationRef().isEmpty() ) + link.setOperationRef( linkObject.getOperationRef() ); + if( !linkObject.getOperationID().isEmpty() ) + link.setOperationId( linkObject.getOperationID() ); + if( linkObject.getNumLinkParameterTuple() != 0 ){ + Map<String, String> parameters = new HashMap<>(); + for( LinkParameterTuple t : linkObject.getLinkParameterTuples() ) + parameters.put( t.getLinkParameterKey(), t.getLinkParameterValue() ); + link.setParameters(parameters); + } + if( !linkObject.getDescription().isEmpty() ) + link.setDescription( linkObject.getDescription() ); + if( linkObject.hasServerObject() ) + link.setServer( ServerObject.composeServer(linkObject.getServerObject()) ); + + return link; + } + /** + * @aspect Parser + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:566 + */ + 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 ) + linkObject.setOperationID( link.getOperationId() ); + if( link.getParameters() != null ){ + for( String key : link.getParameters().keySet() ) + linkObject.addLinkParameterTuple(new LinkParameterTuple(key, link.getParameter(key))); + } + if( link.getDescription() != null ) + linkObject.setDescription( link.getDescription() ); + if( link.getServer() != null ) + linkObject.setServerObject( ServerObject.parseServer(link.getServer()) ); + + return linkObject; + } + /** + * @declaredat ASTNode:1 + */ + public LinkOb() { + 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 LinkOb clone() throws CloneNotSupportedException { + LinkOb node = (LinkOb) 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 LinkOb 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 LinkOb 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 LinkOb 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/LinkObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObject.java index a824d4f5d47d33ad120a6c0159c6ecda7533111a..d52b74cf66030535203d36a252ee9d2348039614 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 @@ -17,62 +17,12 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:83 - * @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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:95 + * @astdecl LinkObject : ASTNode ::= <OperationRef:String> <OperationID:String> LinkParameterTuple* HeaderTuple* <Description:String> [ServerObject] Extension*; + * @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">{@link Extension}*</span>; */ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:570 - */ - public static Link composeLink (LinkObject linkObject){ - Link link = new Link(); - - if( !linkObject.getRef().isEmpty() ) - link.setRef(linkObject.getRef()); - if( !linkObject.getOperationRef().isEmpty() ) - link.setOperationRef( linkObject.getOperationRef() ); - if( !linkObject.getOperationID().isEmpty() ) - link.setOperationId( linkObject.getOperationID() ); - if( linkObject.getNumLinkParameterTuple() != 0 ){ - Map<String, String> parameters = new HashMap<>(); - for( LinkParameterTuple t : linkObject.getLinkParameterTuples() ) - parameters.put( t.getLinkParameterKey(), t.getLinkParameterValue() ); - link.setParameters(parameters); - } - if( !linkObject.getDescription().isEmpty() ) - link.setDescription( linkObject.getDescription() ); - if( linkObject.hasServerObject() ) - link.setServer( ServerObject.composeServer(linkObject.getServerObject()) ); - - return link; - } - /** - * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:567 - */ - 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 ) - linkObject.setOperationID( link.getOperationId() ); - if( link.getParameters() != null ){ - for( String key : link.getParameters().keySet() ) - linkObject.addLinkParameterTuple(new LinkParameterTuple(key, link.getParameter(key))); - } - if( link.getDescription() != null ) - linkObject.setDescription( link.getDescription() ); - if( link.getServer() != null ) - linkObject.setServerObject( ServerObject.parseServer(link.getServer()) ); - - return linkObject; - } /** * @declaredat ASTNode:1 */ @@ -87,62 +37,63 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[3]; + children = new ASTNode[4]; setChild(new JastAddList(), 0); setChild(new JastAddList(), 1); setChild(new Opt(), 2); + setChild(new JastAddList(), 3); } /** - * @declaredat ASTNode:16 + * @declaredat ASTNode:17 */ @ASTNodeAnnotation.Constructor( - 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"} + name = {"OperationRef", "OperationID", "LinkParameterTuple", "HeaderTuple", "Description", "ServerObject", "Extension"}, + type = {"String", "String", "JastAddList<LinkParameterTuple>", "JastAddList<HeaderTuple>", "String", "Opt<ServerObject>", "JastAddList<Extension>"}, + kind = {"Token", "Token", "List", "List", "Token", "Opt", "List"} ) - public LinkObject(String p0, String p1, JastAddList<LinkParameterTuple> p2, JastAddList<HeaderTuple> p3, String p4, Opt<ServerObject> p5, String p6) { + public LinkObject(String p0, String p1, JastAddList<LinkParameterTuple> p2, JastAddList<HeaderTuple> p3, String p4, Opt<ServerObject> p5, JastAddList<Extension> p6) { setOperationRef(p0); setOperationID(p1); setChild(p2, 0); setChild(p3, 1); setDescription(p4); setChild(p5, 2); - setRef(p6); + setChild(p6, 3); } /** @apilevel low-level - * @declaredat ASTNode:31 + * @declaredat ASTNode:32 */ protected int numChildren() { - return 3; + return 4; } /** * @apilevel internal - * @declaredat ASTNode:37 + * @declaredat ASTNode:38 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:41 + * @declaredat ASTNode:42 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:45 + * @declaredat ASTNode:46 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:49 + * @declaredat ASTNode:50 */ public LinkObject clone() throws CloneNotSupportedException { LinkObject node = (LinkObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:54 + * @declaredat ASTNode:55 */ public LinkObject copy() { try { @@ -162,7 +113,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:73 + * @declaredat ASTNode:74 */ @Deprecated public LinkObject fullCopy() { @@ -173,7 +124,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:83 + * @declaredat ASTNode:84 */ public LinkObject treeCopyNoTransform() { LinkObject tree = (LinkObject) copy(); @@ -194,7 +145,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:103 + * @declaredat ASTNode:104 */ public LinkObject treeCopy() { LinkObject tree = (LinkObject) copy(); @@ -210,10 +161,10 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:117 + * @declaredat ASTNode:118 */ protected boolean is$Equal(ASTNode node) { - 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); + return super.is$Equal(node) && (tokenString_OperationRef == ((LinkObject) node).tokenString_OperationRef) && (tokenString_OperationID == ((LinkObject) node).tokenString_OperationID) && (tokenString_Description == ((LinkObject) node).tokenString_Description); } /** * Replaces the lexeme OperationRef. @@ -547,24 +498,114 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { return (Opt<ServerObject>) getChildNoTransform(2); } /** - * Replaces the lexeme Ref. - * @param value The new value for the lexeme Ref. + * Replaces the Extension list. + * @param list The new list node to be used as the Extension list. * @apilevel high-level */ - public void setRef(String value) { - tokenString_Ref = value; + public void setExtensionList(JastAddList<Extension> list) { + setChild(list, 3); } - /** @apilevel internal + /** + * 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 */ - protected String tokenString_Ref; + public void addExtensionNoTransform(Extension node) { + JastAddList<Extension> list = getExtensionListNoTransform(); + list.addChild(node); + } /** - * Retrieves the value for the lexeme Ref. - * @return The value for the lexeme Ref. + * 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 */ - @ASTNodeAnnotation.Token(name="Ref") - public String getRef() { - return tokenString_Ref != null ? tokenString_Ref : ""; + 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(3); + 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(3); + } + /** + * @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/LinkParameterTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkParameterTuple.java index c847bccd3fc312155bf43c870d9d42b3299a80be..21d7b5b574120d339c361a054231ef67a5cac63d 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:84 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:96 * @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/LinkReference.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkReference.java new file mode 100644 index 0000000000000000000000000000000000000000..6fcc185304179362be9d5da6c2af9e52c00b4328 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkReference.java @@ -0,0 +1,207 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:94 + * @astdecl LinkReference : LinkOb ::= <Ref:String> <LinkObject:LinkObject>; + * @production LinkReference : {@link LinkOb} ::= <span class="component"><Ref:String></span> <span class="component"><LinkObject:LinkObject></span>; + + */ +public class LinkReference extends LinkOb implements Cloneable { + /** + * @declaredat ASTNode:1 + */ + public LinkReference() { + 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 = {"Ref", "LinkObject"}, + type = {"String", "LinkObject"}, + kind = {"Token", "Token"} + ) + public LinkReference(String p0, LinkObject p1) { + setRef(p0); + setLinkObject(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 LinkReference clone() throws CloneNotSupportedException { + LinkReference node = (LinkReference) super.clone(); + return node; + } + /** @apilevel internal + * @declaredat ASTNode:45 + */ + public LinkReference copy() { + try { + LinkReference node = (LinkReference) 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 LinkReference 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 LinkReference treeCopyNoTransform() { + LinkReference tree = (LinkReference) 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 LinkReference treeCopy() { + LinkReference tree = (LinkReference) 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_Ref == ((LinkReference) node).tokenString_Ref) && (tokenLinkObject_LinkObject == ((LinkReference) node).tokenLinkObject_LinkObject); + } + /** + * 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 : ""; + } + /** + * Replaces the lexeme LinkObject. + * @param value The new value for the lexeme LinkObject. + * @apilevel high-level + */ + public void setLinkObject(LinkObject value) { + tokenLinkObject_LinkObject = value; + } + /** @apilevel internal + */ + protected LinkObject tokenLinkObject_LinkObject; + /** + * Retrieves the value for the lexeme LinkObject. + * @return The value for the lexeme LinkObject. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="LinkObject") + public LinkObject getLinkObject() { + return tokenLinkObject_LinkObject; + } + /** @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/LinkTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkTuple.java index 8c73a5ed114bd3de674bd8b178d8e49c3e4676b9..f9ab5bbcb0d2118c4c3c8bce02b50648b21c77b8 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkTuple.java @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:30 + * @astdecl LinkTuple : ASTNode ::= <Key:String> LinkOb; + * @production LinkTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link LinkOb}</span>; */ public class LinkTuple extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class LinkTuple extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Key", "LinkObject"}, - type = {"String", "LinkObject"}, + name = {"Key", "LinkOb"}, + type = {"String", "LinkOb"}, kind = {"Token", "Child"} ) - public LinkTuple(String p0, LinkObject p1) { + public LinkTuple(String p0, LinkOb p1) { setKey(p0); setChild(p1, 0); } @@ -178,30 +178,30 @@ public class LinkTuple extends ASTNode<ASTNode> implements Cloneable { return tokenString_Key != null ? tokenString_Key : ""; } /** - * Replaces the LinkObject child. - * @param node The new node to replace the LinkObject child. + * Replaces the LinkOb child. + * @param node The new node to replace the LinkOb child. * @apilevel high-level */ - public void setLinkObject(LinkObject node) { + public void setLinkOb(LinkOb node) { setChild(node, 0); } /** - * Retrieves the LinkObject child. - * @return The current node used as the LinkObject child. + * Retrieves the LinkOb child. + * @return The current node used as the LinkOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="LinkObject") - public LinkObject getLinkObject() { - return (LinkObject) getChild(0); + @ASTNodeAnnotation.Child(name="LinkOb") + public LinkOb getLinkOb() { + return (LinkOb) getChild(0); } /** - * Retrieves the LinkObject child. + * Retrieves the LinkOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the LinkObject child. + * @return The current node used as the LinkOb child. * @apilevel low-level */ - public LinkObject getLinkObjectNoTransform() { - return (LinkObject) getChildNoTransform(0); + public LinkOb getLinkObNoTransform() { + return (LinkOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 689d5b0e2ce14d3ca3d28036e3c1b0682af791c7..d6000e9e228f72610186b2e8f893d2f351d0bcb9 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:106 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:122 * @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 89223d2d8a0a2ace439ec48353c45761f98fbdcc..5d89d227601beb3cd6afa7b075291e809633fccc 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 @@ -17,15 +17,15 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:65 - * @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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:69 + * @astdecl MediaTypeObject : ASTNode ::= [SchemaOb] <Example:Object> ExampleTuple* EncodingTuple* Extension*; + * @production MediaTypeObject : {@link ASTNode} ::= <span class="component">[{@link SchemaOb}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link EncodingTuple}*</span> <span class="component">{@link Extension}*</span>; */ public class MediaTypeObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:459 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:458 */ public static MediaType composeMediaType (MediaTypeObject mediaTypeObject){ MediaType mediaType = new MediaType(); @@ -51,7 +51,7 @@ public class MediaTypeObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:474 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:473 */ public static MediaTypeObject parseMediaType(MediaType mediaType){ MediaTypeObject mediaTypeObject = new MediaTypeObject(); @@ -85,59 +85,61 @@ public class MediaTypeObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[3]; + children = new ASTNode[4]; setChild(new Opt(), 0); setChild(new JastAddList(), 1); setChild(new JastAddList(), 2); + setChild(new JastAddList(), 3); } /** - * @declaredat ASTNode:16 + * @declaredat ASTNode:17 */ @ASTNodeAnnotation.Constructor( - name = {"SchemaObject", "Example", "ExampleTuple", "EncodingTuple"}, - type = {"Opt<SchemaObject>", "Object", "JastAddList<ExampleTuple>", "JastAddList<EncodingTuple>"}, - kind = {"Opt", "Token", "List", "List"} + name = {"SchemaOb", "Example", "ExampleTuple", "EncodingTuple", "Extension"}, + type = {"Opt<SchemaOb>", "Object", "JastAddList<ExampleTuple>", "JastAddList<EncodingTuple>", "JastAddList<Extension>"}, + kind = {"Opt", "Token", "List", "List", "List"} ) - public MediaTypeObject(Opt<SchemaObject> p0, Object p1, JastAddList<ExampleTuple> p2, JastAddList<EncodingTuple> p3) { + public MediaTypeObject(Opt<SchemaOb> p0, Object p1, JastAddList<ExampleTuple> p2, JastAddList<EncodingTuple> p3, JastAddList<Extension> p4) { setChild(p0, 0); setExample(p1); setChild(p2, 1); setChild(p3, 2); + setChild(p4, 3); } /** @apilevel low-level - * @declaredat ASTNode:28 + * @declaredat ASTNode:30 */ protected int numChildren() { - return 3; + return 4; } /** * @apilevel internal - * @declaredat ASTNode:34 + * @declaredat ASTNode:36 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:38 + * @declaredat ASTNode:40 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:42 + * @declaredat ASTNode:44 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:46 + * @declaredat ASTNode:48 */ public MediaTypeObject clone() throws CloneNotSupportedException { MediaTypeObject node = (MediaTypeObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:51 + * @declaredat ASTNode:53 */ public MediaTypeObject copy() { try { @@ -157,7 +159,7 @@ public class MediaTypeObject 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:70 + * @declaredat ASTNode:72 */ @Deprecated public MediaTypeObject fullCopy() { @@ -168,7 +170,7 @@ public class MediaTypeObject 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:80 + * @declaredat ASTNode:82 */ public MediaTypeObject treeCopyNoTransform() { MediaTypeObject tree = (MediaTypeObject) copy(); @@ -189,7 +191,7 @@ public class MediaTypeObject 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:100 + * @declaredat ASTNode:102 */ public MediaTypeObject treeCopy() { MediaTypeObject tree = (MediaTypeObject) copy(); @@ -205,61 +207,61 @@ public class MediaTypeObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:114 + * @declaredat ASTNode:116 */ protected boolean is$Equal(ASTNode node) { return super.is$Equal(node) && (tokenObject_Example == ((MediaTypeObject) node).tokenObject_Example); } /** - * Replaces the optional node for the SchemaObject child. This is the <code>Opt</code> - * node containing the child SchemaObject, not the actual child! - * @param opt The new node to be used as the optional node for the SchemaObject child. + * Replaces the optional node for the SchemaOb child. This is the <code>Opt</code> + * node containing the child SchemaOb, not the actual child! + * @param opt The new node to be used as the optional node for the SchemaOb child. * @apilevel low-level */ - public void setSchemaObjectOpt(Opt<SchemaObject> opt) { + public void setSchemaObOpt(Opt<SchemaOb> opt) { setChild(opt, 0); } /** - * Replaces the (optional) SchemaObject child. - * @param node The new node to be used as the SchemaObject child. + * Replaces the (optional) SchemaOb child. + * @param node The new node to be used as the SchemaOb child. * @apilevel high-level */ - public void setSchemaObject(SchemaObject node) { - getSchemaObjectOpt().setChild(node, 0); + public void setSchemaOb(SchemaOb node) { + getSchemaObOpt().setChild(node, 0); } /** - * Check whether the optional SchemaObject child exists. - * @return {@code true} if the optional SchemaObject child exists, {@code false} if it does not. + * Check whether the optional SchemaOb child exists. + * @return {@code true} if the optional SchemaOb child exists, {@code false} if it does not. * @apilevel high-level */ - public boolean hasSchemaObject() { - return getSchemaObjectOpt().getNumChild() != 0; + public boolean hasSchemaOb() { + return getSchemaObOpt().getNumChild() != 0; } /** - * Retrieves the (optional) SchemaObject child. - * @return The SchemaObject child, if it exists. Returns {@code null} otherwise. + * Retrieves the (optional) SchemaOb child. + * @return The SchemaOb child, if it exists. Returns {@code null} otherwise. * @apilevel low-level */ - public SchemaObject getSchemaObject() { - return (SchemaObject) getSchemaObjectOpt().getChild(0); + public SchemaOb getSchemaOb() { + return (SchemaOb) getSchemaObOpt().getChild(0); } /** - * Retrieves the optional node for the SchemaObject child. This is the <code>Opt</code> node containing the child SchemaObject, not the actual child! - * @return The optional node for child the SchemaObject child. + * Retrieves the optional node for the SchemaOb child. This is the <code>Opt</code> node containing the child SchemaOb, not the actual child! + * @return The optional node for child the SchemaOb child. * @apilevel low-level */ - @ASTNodeAnnotation.OptChild(name="SchemaObject") - public Opt<SchemaObject> getSchemaObjectOpt() { - return (Opt<SchemaObject>) getChild(0); + @ASTNodeAnnotation.OptChild(name="SchemaOb") + public Opt<SchemaOb> getSchemaObOpt() { + return (Opt<SchemaOb>) getChild(0); } /** - * Retrieves the optional node for child SchemaObject. This is the <code>Opt</code> node containing the child SchemaObject, not the actual child! + * Retrieves the optional node for child SchemaOb. This is the <code>Opt</code> node containing the child SchemaOb, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child SchemaObject. + * @return The optional node for child SchemaOb. * @apilevel low-level */ - public Opt<SchemaObject> getSchemaObjectOptNoTransform() { - return (Opt<SchemaObject>) getChildNoTransform(0); + public Opt<SchemaOb> getSchemaObOptNoTransform() { + return (Opt<SchemaOb>) getChildNoTransform(0); } /** * Replaces the lexeme Example. @@ -501,6 +503,116 @@ public class MediaTypeObject extends ASTNode<ASTNode> implements Cloneable { public JastAddList<EncodingTuple> getEncodingTuplesNoTransform() { return getEncodingTupleListNoTransform(); } + /** + * 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, 3); + } + /** + * 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(3); + 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(3); + } + /** + * @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(); 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 628c033079796fd9c416667e939b6da5f3910d54..51309984bc821b85d90ea2a0dcbd432b45c7a1ef 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 @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:97 - * @astdecl NotSchema : ASTNode ::= SchemaObject; - * @production NotSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:113 + * @astdecl NotSchema : ASTNode ::= SchemaOb; + * @production NotSchema : {@link ASTNode} ::= <span class="component">{@link SchemaOb}</span>; */ public class NotSchema extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class NotSchema extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"SchemaObject"}, - type = {"SchemaObject"}, + name = {"SchemaOb"}, + type = {"SchemaOb"}, kind = {"Child"} ) - public NotSchema(SchemaObject p0) { + public NotSchema(SchemaOb p0) { setChild(p0, 0); } /** @apilevel low-level @@ -157,30 +157,30 @@ public class NotSchema extends ASTNode<ASTNode> implements Cloneable { return super.is$Equal(node); } /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. + * Replaces the SchemaOb child. + * @param node The new node to replace the SchemaOb child. * @apilevel high-level */ - public void setSchemaObject(SchemaObject node) { + public void setSchemaOb(SchemaOb node) { setChild(node, 0); } /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. + * Retrieves the SchemaOb child. + * @return The current node used as the SchemaOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); + @ASTNodeAnnotation.Child(name="SchemaOb") + public SchemaOb getSchemaOb() { + return (SchemaOb) getChild(0); } /** - * Retrieves the SchemaObject child. + * Retrieves the SchemaOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. + * @return The current node used as the SchemaOb child. * @apilevel low-level */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); + public SchemaOb getSchemaObNoTransform() { + return (SchemaOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 f33771117977ecedae5c349c30636f9728b13ff4..006df353ec767da82f8f336e926e188867b946e1 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 @@ -17,15 +17,15 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:122 - * @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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:140 + * @astdecl OAuthFlowObject : ASTNode ::= <AuthorizationUrl:String> <TokenUrl:String> <RefreshUrl:String> ScopesTuple* <Configuration:String> Extension*; + * @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> <span class="component">{@link Extension}*</span>; */ public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:829 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:828 */ public static OAuthFlow composeOAuthFlow (OAuthFlowObject oAuthFlowObject){ OAuthFlow oAuthFlow = new OAuthFlow(); @@ -46,7 +46,7 @@ public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:846 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:845 */ public static OAuthFlowObject parseOAuthFlow(OAuthFlow oAuthFlow){ OAuthFlowObject oAuthFlowObject = new OAuthFlowObject(); @@ -77,58 +77,60 @@ public class OAuthFlowObject 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 = {"AuthorizationUrl", "TokenUrl", "RefreshUrl", "ScopesTuple", "Configuration"}, - type = {"String", "String", "String", "JastAddList<ScopesTuple>", "String"}, - kind = {"Token", "Token", "Token", "List", "Token"} + name = {"AuthorizationUrl", "TokenUrl", "RefreshUrl", "ScopesTuple", "Configuration", "Extension"}, + type = {"String", "String", "String", "JastAddList<ScopesTuple>", "String", "JastAddList<Extension>"}, + kind = {"Token", "Token", "Token", "List", "Token", "List"} ) - public OAuthFlowObject(String p0, String p1, String p2, JastAddList<ScopesTuple> p3, String p4) { + public OAuthFlowObject(String p0, String p1, String p2, JastAddList<ScopesTuple> p3, String p4, JastAddList<Extension> p5) { setAuthorizationUrl(p0); setTokenUrl(p1); setRefreshUrl(p2); setChild(p3, 0); setConfiguration(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 OAuthFlowObject clone() throws CloneNotSupportedException { OAuthFlowObject node = (OAuthFlowObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:50 + * @declaredat ASTNode:52 */ public OAuthFlowObject copy() { try { @@ -148,7 +150,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:69 + * @declaredat ASTNode:71 */ @Deprecated public OAuthFlowObject fullCopy() { @@ -159,7 +161,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:79 + * @declaredat ASTNode:81 */ public OAuthFlowObject treeCopyNoTransform() { OAuthFlowObject tree = (OAuthFlowObject) copy(); @@ -180,7 +182,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:99 + * @declaredat ASTNode:101 */ public OAuthFlowObject treeCopy() { OAuthFlowObject tree = (OAuthFlowObject) copy(); @@ -196,7 +198,7 @@ public class OAuthFlowObject 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_AuthorizationUrl == ((OAuthFlowObject) node).tokenString_AuthorizationUrl) && (tokenString_TokenUrl == ((OAuthFlowObject) node).tokenString_TokenUrl) && (tokenString_RefreshUrl == ((OAuthFlowObject) node).tokenString_RefreshUrl) && (tokenString_Configuration == ((OAuthFlowObject) node).tokenString_Configuration); @@ -391,6 +393,116 @@ public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { public String getConfiguration() { return tokenString_Configuration != null ? tokenString_Configuration : ""; } + /** + * 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() { 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 df2bfffd6111a357b4c0d8f5b2095b009faa6a16..b3317574e657ffc7484101491ec5a767355f0a7d 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 @@ -17,15 +17,15 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:115 - * @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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:133 + * @astdecl OAuthFlowsObject : ASTNode ::= [Implicit] [Password] [ClientCredentials] [AuthorizationCode] Extension*; + * @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> <span class="component">{@link Extension}*</span>; */ public class OAuthFlowsObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:809 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:808 */ public static OAuthFlows composeOAuthFlows (OAuthFlowsObject oAuthFlowsObject){ OAuthFlows oAuthFlows = new OAuthFlows(); @@ -48,7 +48,7 @@ public class OAuthFlowsObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:819 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:818 */ public static OAuthFlowsObject parseOAuthFlows(OAuthFlows oAuthFlows){ OAuthFlowsObject oAuthFlowsObject = new OAuthFlowsObject(); @@ -90,60 +90,62 @@ public class OAuthFlowsObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[4]; + children = new ASTNode[5]; setChild(new Opt(), 0); setChild(new Opt(), 1); setChild(new Opt(), 2); setChild(new Opt(), 3); + setChild(new JastAddList(), 4); } /** - * @declaredat ASTNode:17 + * @declaredat ASTNode:18 */ @ASTNodeAnnotation.Constructor( - name = {"Implicit", "Password", "ClientCredentials", "AuthorizationCode"}, - type = {"Opt<Implicit>", "Opt<Password>", "Opt<ClientCredentials>", "Opt<AuthorizationCode>"}, - kind = {"Opt", "Opt", "Opt", "Opt"} + name = {"Implicit", "Password", "ClientCredentials", "AuthorizationCode", "Extension"}, + type = {"Opt<Implicit>", "Opt<Password>", "Opt<ClientCredentials>", "Opt<AuthorizationCode>", "JastAddList<Extension>"}, + kind = {"Opt", "Opt", "Opt", "Opt", "List"} ) - public OAuthFlowsObject(Opt<Implicit> p0, Opt<Password> p1, Opt<ClientCredentials> p2, Opt<AuthorizationCode> p3) { + public OAuthFlowsObject(Opt<Implicit> p0, Opt<Password> p1, Opt<ClientCredentials> p2, Opt<AuthorizationCode> p3, JastAddList<Extension> p4) { setChild(p0, 0); setChild(p1, 1); setChild(p2, 2); setChild(p3, 3); + setChild(p4, 4); } /** @apilevel low-level - * @declaredat ASTNode:29 + * @declaredat ASTNode:31 */ protected int numChildren() { - return 4; + return 5; } /** * @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 OAuthFlowsObject clone() throws CloneNotSupportedException { OAuthFlowsObject node = (OAuthFlowsObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:52 + * @declaredat ASTNode:54 */ public OAuthFlowsObject copy() { try { @@ -163,7 +165,7 @@ public class OAuthFlowsObject 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 OAuthFlowsObject fullCopy() { @@ -174,7 +176,7 @@ public class OAuthFlowsObject 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 OAuthFlowsObject treeCopyNoTransform() { OAuthFlowsObject tree = (OAuthFlowsObject) copy(); @@ -195,7 +197,7 @@ public class OAuthFlowsObject 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 OAuthFlowsObject treeCopy() { OAuthFlowsObject tree = (OAuthFlowsObject) copy(); @@ -211,7 +213,7 @@ public class OAuthFlowsObject 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); @@ -420,6 +422,116 @@ public class OAuthFlowsObject extends ASTNode<ASTNode> implements Cloneable { public Opt<AuthorizationCode> getAuthorizationCodeOptNoTransform() { return (Opt<AuthorizationCode>) getChildNoTransform(3); } + /** + * 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, 4); + } + /** + * 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(4); + 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(4); + } + /** + * @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(); 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 54431bf9155b106c561984ec09beacfdadefe67e..0fec9a89eaf08616027dc91d4f9e482a0e4c143b 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 @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:102 - * @astdecl OneOfSchema : ASTNode ::= SchemaObject; - * @production OneOfSchema : {@link ASTNode} ::= <span class="component">{@link SchemaObject}</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:118 + * @astdecl OneOfSchema : ASTNode ::= SchemaOb; + * @production OneOfSchema : {@link ASTNode} ::= <span class="component">{@link SchemaOb}</span>; */ public class OneOfSchema extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class OneOfSchema extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"SchemaObject"}, - type = {"SchemaObject"}, + name = {"SchemaOb"}, + type = {"SchemaOb"}, kind = {"Child"} ) - public OneOfSchema(SchemaObject p0) { + public OneOfSchema(SchemaOb p0) { setChild(p0, 0); } /** @apilevel low-level @@ -157,30 +157,30 @@ public class OneOfSchema extends ASTNode<ASTNode> implements Cloneable { return super.is$Equal(node); } /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. + * Replaces the SchemaOb child. + * @param node The new node to replace the SchemaOb child. * @apilevel high-level */ - public void setSchemaObject(SchemaObject node) { + public void setSchemaOb(SchemaOb node) { setChild(node, 0); } /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. + * Retrieves the SchemaOb child. + * @return The current node used as the SchemaOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); + @ASTNodeAnnotation.Child(name="SchemaOb") + public SchemaOb getSchemaOb() { + return (SchemaOb) getChild(0); } /** - * Retrieves the SchemaObject child. + * Retrieves the SchemaOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. + * @return The current node used as the SchemaOb child. * @apilevel low-level */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); + public SchemaOb getSchemaObNoTransform() { + return (SchemaOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 7a69b0dcd532dc6b9a03582f26c0df1f4d729d35..70bb060e804e4f8dc2a42ff5f151fe471422ab89 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:2 + * @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> Extension*; * @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> <span class="component">{@link Extension}*</span>; @@ -25,7 +25,7 @@ import java.util.stream.IntStream; public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:13 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:13 */ public static OpenApi3 composeOpenAPI (OpenAPIObject openapi){ OpenApi3 api3 = new OpenApi3(); @@ -75,7 +75,7 @@ public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect RandomRequestGenerator - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/RandomRequestGenerator.jadd:32 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\RandomRequestGenerator.jadd:32 */ public void generateRequests() throws Exception { String baseUrl = this.getServerObject(0).getUrl(); @@ -86,7 +86,7 @@ public class OpenAPIObject extends ASTNode<ASTNode> implements Cloneable { } /** * @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(); 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 b3494c90e542f4b6b442d2af10096ba318c8352b..64ebd4879f961a507a3ce761a29853d61f488e6f 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 @@ -17,15 +17,15 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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> Extension*; - * @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> <span class="component">{@link Extension}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:51 + * @astdecl OperationObject : ASTNode ::= Tag* <Summary:String> <Description:String> [ExternalDocObject] <OperationID:String> ParameterObject* [RequestBodyOb] ResponseTuple* CallbackTuple* <DeprecatedBoolean:Boolean> SecurityRequirementObject* ServerObject* <Required:Boolean> Extension*; + * @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 RequestBodyOb}]</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> <span class="component">{@link Extension}*</span>; */ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:314 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:313 */ public static Operation composeOperation (OperationObject operationObject){ Operation operation = new Operation(); @@ -88,7 +88,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect RandomRequestGenerator - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/RandomRequestGenerator.jadd:60 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\RandomRequestGenerator.jadd:60 */ public void sendRandomGET(String targetUrl) throws Exception { Random rand = new Random(); @@ -142,7 +142,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect RandomRequestGenerator - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/RandomRequestGenerator.jadd:111 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\RandomRequestGenerator.jadd:111 */ public void sendRandomPOST(String targetUrl) throws Exception { Random rand = new Random(); @@ -198,7 +198,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect RandomRequestGenerator - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/RandomRequestGenerator.jadd:164 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\RandomRequestGenerator.jadd:164 */ public String generateRandomString(Random rand, JastAddList<EnumObj> objs) { if( objs.getNumChild() != 0 ) @@ -213,7 +213,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect RandomRequestGenerator - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/RandomRequestGenerator.jadd:176 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\RandomRequestGenerator.jadd:176 */ public String generateRandomInt(Random rand, int minimum, int maximum){ if( minimum > -1 && maximum > 0 ) @@ -226,7 +226,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:350 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:349 */ public static OperationObject parseOperation(Operation operation){ OperationObject operationObject = new OperationObject(); @@ -306,11 +306,11 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:22 */ @ASTNodeAnnotation.Constructor( - name = {"Tag", "Summary", "Description", "ExternalDocObject", "OperationID", "ParameterObject", "RequestBodyObject", "ResponseTuple", "CallbackTuple", "DeprecatedBoolean", "SecurityRequirementObject", "ServerObject", "Required", "Extension"}, - type = {"JastAddList<Tag>", "String", "String", "Opt<ExternalDocObject>", "String", "JastAddList<ParameterObject>", "Opt<RequestBodyObject>", "JastAddList<ResponseTuple>", "JastAddList<CallbackTuple>", "Boolean", "JastAddList<SecurityRequirementObject>", "JastAddList<ServerObject>", "Boolean", "JastAddList<Extension>"}, + name = {"Tag", "Summary", "Description", "ExternalDocObject", "OperationID", "ParameterObject", "RequestBodyOb", "ResponseTuple", "CallbackTuple", "DeprecatedBoolean", "SecurityRequirementObject", "ServerObject", "Required", "Extension"}, + type = {"JastAddList<Tag>", "String", "String", "Opt<ExternalDocObject>", "String", "JastAddList<ParameterObject>", "Opt<RequestBodyOb>", "JastAddList<ResponseTuple>", "JastAddList<CallbackTuple>", "Boolean", "JastAddList<SecurityRequirementObject>", "JastAddList<ServerObject>", "Boolean", "JastAddList<Extension>"}, kind = {"List", "Token", "Token", "Opt", "Token", "List", "Opt", "List", "List", "Token", "List", "List", "Token", "List"} ) - 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, JastAddList<Extension> p13) { + public OperationObject(JastAddList<Tag> p0, String p1, String p2, Opt<ExternalDocObject> p3, String p4, JastAddList<ParameterObject> p5, Opt<RequestBodyOb> p6, JastAddList<ResponseTuple> p7, JastAddList<CallbackTuple> p8, Boolean p9, JastAddList<SecurityRequirementObject> p10, JastAddList<ServerObject> p11, Boolean p12, JastAddList<Extension> p13) { setChild(p0, 0); setSummary(p1); setDescription(p2); @@ -764,55 +764,55 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { return getParameterObjectListNoTransform(); } /** - * Replaces the optional node for the RequestBodyObject child. This is the <code>Opt</code> - * node containing the child RequestBodyObject, not the actual child! - * @param opt The new node to be used as the optional node for the RequestBodyObject child. + * Replaces the optional node for the RequestBodyOb child. This is the <code>Opt</code> + * node containing the child RequestBodyOb, not the actual child! + * @param opt The new node to be used as the optional node for the RequestBodyOb child. * @apilevel low-level */ - public void setRequestBodyObjectOpt(Opt<RequestBodyObject> opt) { + public void setRequestBodyObOpt(Opt<RequestBodyOb> opt) { setChild(opt, 3); } /** - * Replaces the (optional) RequestBodyObject child. - * @param node The new node to be used as the RequestBodyObject child. + * Replaces the (optional) RequestBodyOb child. + * @param node The new node to be used as the RequestBodyOb child. * @apilevel high-level */ - public void setRequestBodyObject(RequestBodyObject node) { - getRequestBodyObjectOpt().setChild(node, 0); + public void setRequestBodyOb(RequestBodyOb node) { + getRequestBodyObOpt().setChild(node, 0); } /** - * Check whether the optional RequestBodyObject child exists. - * @return {@code true} if the optional RequestBodyObject child exists, {@code false} if it does not. + * Check whether the optional RequestBodyOb child exists. + * @return {@code true} if the optional RequestBodyOb child exists, {@code false} if it does not. * @apilevel high-level */ - public boolean hasRequestBodyObject() { - return getRequestBodyObjectOpt().getNumChild() != 0; + public boolean hasRequestBodyOb() { + return getRequestBodyObOpt().getNumChild() != 0; } /** - * Retrieves the (optional) RequestBodyObject child. - * @return The RequestBodyObject child, if it exists. Returns {@code null} otherwise. + * Retrieves the (optional) RequestBodyOb child. + * @return The RequestBodyOb child, if it exists. Returns {@code null} otherwise. * @apilevel low-level */ - public RequestBodyObject getRequestBodyObject() { - return (RequestBodyObject) getRequestBodyObjectOpt().getChild(0); + public RequestBodyOb getRequestBodyOb() { + return (RequestBodyOb) getRequestBodyObOpt().getChild(0); } /** - * Retrieves the optional node for the RequestBodyObject child. This is the <code>Opt</code> node containing the child RequestBodyObject, not the actual child! - * @return The optional node for child the RequestBodyObject child. + * Retrieves the optional node for the RequestBodyOb child. This is the <code>Opt</code> node containing the child RequestBodyOb, not the actual child! + * @return The optional node for child the RequestBodyOb child. * @apilevel low-level */ - @ASTNodeAnnotation.OptChild(name="RequestBodyObject") - public Opt<RequestBodyObject> getRequestBodyObjectOpt() { - return (Opt<RequestBodyObject>) getChild(3); + @ASTNodeAnnotation.OptChild(name="RequestBodyOb") + public Opt<RequestBodyOb> getRequestBodyObOpt() { + return (Opt<RequestBodyOb>) getChild(3); } /** - * Retrieves the optional node for child RequestBodyObject. This is the <code>Opt</code> node containing the child RequestBodyObject, not the actual child! + * Retrieves the optional node for child RequestBodyOb. This is the <code>Opt</code> node containing the child RequestBodyOb, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child RequestBodyObject. + * @return The optional node for child RequestBodyOb. * @apilevel low-level */ - public Opt<RequestBodyObject> getRequestBodyObjectOptNoTransform() { - return (Opt<RequestBodyObject>) getChildNoTransform(3); + public Opt<RequestBodyOb> getRequestBodyObOptNoTransform() { + return (Opt<RequestBodyOb>) getChildNoTransform(3); } /** * Replaces the ResponseTuple list. 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 28ad13ea2a62d721d84cb5de9bf8dd74b4c2102e..d294c7a3a9083ac64a26a80e4d34aa89b9d16d85 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:43 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:45 * @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/ParameterOb.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterOb.java index 639294cdcc960e67e0282501779283d85454109b..ce1717f7479b6c432d5228ec1ca4473ec4651b4e 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterOb.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterOb.java @@ -17,12 +17,108 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:56 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:58 * @astdecl ParameterOb : ASTNode; * @production ParameterOb : {@link ASTNode}; */ public abstract class ParameterOb extends ASTNode<ASTNode> implements Cloneable { + /** + * @aspect Composer + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:390 + */ + public static Parameter composeParameter (ParameterObject parameterObject){ + Parameter parameter = new Parameter(); + + 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()); + if( parameterObject.getDeprecatedBoolean() != null ) + parameter.setDeprecated(parameterObject.getDeprecatedBoolean()); + if( !parameterObject.getStyle().isEmpty() ) + parameter.setStyle(parameterObject.getStyle()); + if( parameterObject.getAllowReserved() != null ) + parameter.setAllowReserved(parameterObject.getAllowReserved()); + if( parameterObject.getExplode() != null ) + parameter.setExplode(parameterObject.getExplode()); + if( parameterObject.getSchemaObject() != null ) + parameter.setSchema(SchemaObject.composeSchema(parameterObject.getSchemaObject())); + if( parameterObject.getExample() != null ) + 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> contentMap = new HashMap<>(); + for( ContentTuple t : parameterObject.getContentTuples() ) + contentMap.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); + parameter.setContentMediaTypes(contentMap); + } + if( parameterObject.getRequired() != null ) + parameter.setRequired(parameterObject.getRequired()); + if( parameterObject.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : parameterObject.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + parameter.setExtensions(extensionMap); + } + + return parameter; + } + /** + * @aspect Parser + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:415 + */ + 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.getDescription() != null ) + parameterObject.setDescription(parameter.getDescription()); + if( parameter.getDeprecated() != null ) + 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 ) + 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.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(parameter.getExample(key)))); + } + if( parameter.getContentMediaTypes() != null ){ + for( String key : parameter.getContentMediaTypes().keySet() ) + parameterObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(parameter.getContentMediaType(key)))); + } + if( parameter.getRequired() != null ) + parameterObject.setRequired(parameter.getRequired()); + if( parameter.getExtensions() != null ){ + for( String key : parameter.getExtensions().keySet() ) + parameterObject.addExtension(new Extension(key, parameter.getExtensions().get(key))); + } + + return parameterObject; + } /** * @declaredat ASTNode:1 */ 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 ccc1083b4702821de481aef16edbbe219c6e42ee..88ede78528dff9540105ae54e66d447205dd3116 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 @@ -17,108 +17,12 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:58 - * @astdecl ParameterObject : ParameterOb ::= <Name:String> <In:String> <Description:String> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style:String> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExampleTuple* ContentTuple* Extension*; - * @production ParameterObject : {@link ParameterOb} ::= <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">{@link Extension}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:60 + * @astdecl ParameterObject : ParameterOb ::= <Name:String> <In:String> <Description:String> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style:String> <Explode:Boolean> <AllowReserved:Boolean> [SchemaOb] <Example:Object> ExampleTuple* ContentTuple* Extension*; + * @production ParameterObject : {@link ParameterOb} ::= <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 SchemaOb}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component">{@link Extension}*</span>; */ public class ParameterObject extends ParameterOb implements Cloneable { - /** - * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:391 - */ - public static Parameter composeParameter (ParameterObject parameterObject){ - Parameter parameter = new Parameter(); - - 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()); - if( parameterObject.getDeprecatedBoolean() != null ) - parameter.setDeprecated(parameterObject.getDeprecatedBoolean()); - if( !parameterObject.getStyle().isEmpty() ) - parameter.setStyle(parameterObject.getStyle()); - if( parameterObject.getAllowReserved() != null ) - parameter.setAllowReserved(parameterObject.getAllowReserved()); - if( parameterObject.getExplode() != null ) - parameter.setExplode(parameterObject.getExplode()); - if( parameterObject.getSchemaObject() != null ) - parameter.setSchema(SchemaObject.composeSchema(parameterObject.getSchemaObject())); - if( parameterObject.getExample() != null ) - 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> contentMap = new HashMap<>(); - for( ContentTuple t : parameterObject.getContentTuples() ) - contentMap.put(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); - parameter.setContentMediaTypes(contentMap); - } - if( parameterObject.getRequired() != null ) - parameter.setRequired(parameterObject.getRequired()); - if( parameterObject.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : parameterObject.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - parameter.setExtensions(extensionMap); - } - - return parameter; - } - /** - * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:416 - */ - 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.getDescription() != null ) - parameterObject.setDescription(parameter.getDescription()); - if( parameter.getDeprecated() != null ) - 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 ) - 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.addExampleTuple(new ExampleTuple(key, ExampleObject.parseExample(parameter.getExample(key)))); - } - if( parameter.getContentMediaTypes() != null ){ - for( String key : parameter.getContentMediaTypes().keySet() ) - parameterObject.addContentTuple(new ContentTuple(key, MediaTypeObject.parseMediaType(parameter.getContentMediaType(key)))); - } - if( parameter.getRequired() != null ) - parameterObject.setRequired(parameter.getRequired()); - if( parameter.getExtensions() != null ){ - for( String key : parameter.getExtensions().keySet() ) - parameterObject.addExtension(new Extension(key, parameter.getExtensions().get(key))); - } - - return parameterObject; - } /** * @declaredat ASTNode:1 */ @@ -143,11 +47,11 @@ public class ParameterObject extends ParameterOb implements Cloneable { * @declaredat ASTNode:17 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "In", "Description", "Required", "DeprecatedBoolean", "AllowEmptyValue", "Style", "Explode", "AllowReserved", "SchemaObject", "Example", "ExampleTuple", "ContentTuple", "Extension"}, - type = {"String", "String", "String", "Boolean", "Boolean", "Boolean", "String", "Boolean", "Boolean", "Opt<SchemaObject>", "Object", "JastAddList<ExampleTuple>", "JastAddList<ContentTuple>", "JastAddList<Extension>"}, + name = {"Name", "In", "Description", "Required", "DeprecatedBoolean", "AllowEmptyValue", "Style", "Explode", "AllowReserved", "SchemaOb", "Example", "ExampleTuple", "ContentTuple", "Extension"}, + type = {"String", "String", "String", "Boolean", "Boolean", "Boolean", "String", "Boolean", "Boolean", "Opt<SchemaOb>", "Object", "JastAddList<ExampleTuple>", "JastAddList<ContentTuple>", "JastAddList<Extension>"}, kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "List", "List", "List"} ) - 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, JastAddList<Extension> p13) { + public ParameterObject(String p0, String p1, String p2, Boolean p3, Boolean p4, Boolean p5, String p6, Boolean p7, Boolean p8, Opt<SchemaOb> p9, Object p10, JastAddList<ExampleTuple> p11, JastAddList<ContentTuple> p12, JastAddList<Extension> p13) { setName(p0); setIn(p1); setDescription(p2); @@ -450,55 +354,55 @@ public class ParameterObject extends ParameterOb implements Cloneable { return tokenBoolean_AllowReserved; } /** - * Replaces the optional node for the SchemaObject child. This is the <code>Opt</code> - * node containing the child SchemaObject, not the actual child! - * @param opt The new node to be used as the optional node for the SchemaObject child. + * Replaces the optional node for the SchemaOb child. This is the <code>Opt</code> + * node containing the child SchemaOb, not the actual child! + * @param opt The new node to be used as the optional node for the SchemaOb child. * @apilevel low-level */ - public void setSchemaObjectOpt(Opt<SchemaObject> opt) { + public void setSchemaObOpt(Opt<SchemaOb> opt) { setChild(opt, 0); } /** - * Replaces the (optional) SchemaObject child. - * @param node The new node to be used as the SchemaObject child. + * Replaces the (optional) SchemaOb child. + * @param node The new node to be used as the SchemaOb child. * @apilevel high-level */ - public void setSchemaObject(SchemaObject node) { - getSchemaObjectOpt().setChild(node, 0); + public void setSchemaOb(SchemaOb node) { + getSchemaObOpt().setChild(node, 0); } /** - * Check whether the optional SchemaObject child exists. - * @return {@code true} if the optional SchemaObject child exists, {@code false} if it does not. + * Check whether the optional SchemaOb child exists. + * @return {@code true} if the optional SchemaOb child exists, {@code false} if it does not. * @apilevel high-level */ - public boolean hasSchemaObject() { - return getSchemaObjectOpt().getNumChild() != 0; + public boolean hasSchemaOb() { + return getSchemaObOpt().getNumChild() != 0; } /** - * Retrieves the (optional) SchemaObject child. - * @return The SchemaObject child, if it exists. Returns {@code null} otherwise. + * Retrieves the (optional) SchemaOb child. + * @return The SchemaOb child, if it exists. Returns {@code null} otherwise. * @apilevel low-level */ - public SchemaObject getSchemaObject() { - return (SchemaObject) getSchemaObjectOpt().getChild(0); + public SchemaOb getSchemaOb() { + return (SchemaOb) getSchemaObOpt().getChild(0); } /** - * Retrieves the optional node for the SchemaObject child. This is the <code>Opt</code> node containing the child SchemaObject, not the actual child! - * @return The optional node for child the SchemaObject child. + * Retrieves the optional node for the SchemaOb child. This is the <code>Opt</code> node containing the child SchemaOb, not the actual child! + * @return The optional node for child the SchemaOb child. * @apilevel low-level */ - @ASTNodeAnnotation.OptChild(name="SchemaObject") - public Opt<SchemaObject> getSchemaObjectOpt() { - return (Opt<SchemaObject>) getChild(0); + @ASTNodeAnnotation.OptChild(name="SchemaOb") + public Opt<SchemaOb> getSchemaObOpt() { + return (Opt<SchemaOb>) getChild(0); } /** - * Retrieves the optional node for child SchemaObject. This is the <code>Opt</code> node containing the child SchemaObject, not the actual child! + * Retrieves the optional node for child SchemaOb. This is the <code>Opt</code> node containing the child SchemaOb, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> - * @return The optional node for child SchemaObject. + * @return The optional node for child SchemaOb. * @apilevel low-level */ - public Opt<SchemaObject> getSchemaObjectOptNoTransform() { - return (Opt<SchemaObject>) getChildNoTransform(0); + public Opt<SchemaOb> getSchemaObOptNoTransform() { + return (Opt<SchemaOb>) getChildNoTransform(0); } /** * Replaces the lexeme Example. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterReference.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterReference.java index 4718e5b744ffae21ad7d29e07da322780eb0df71..93b6ff0ef474cd5f4d6dff48a3596a6016507a36 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterReference.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterReference.java @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:57 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:59 * @astdecl ParameterReference : ParameterOb ::= <Ref:String> <ParameterObject:ParameterObject>; * @production ParameterReference : {@link ParameterOb} ::= <span class="component"><Ref:String></span> <span class="component"><ParameterObject:ParameterObject></span>; 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 0eeaa8d2ac45274e4c63253f757be231ad6c6dda..dbcb867849e1b71b64aaaeef719d7edecbc6baeb 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 @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:25 + * @astdecl ParameterTuple : ASTNode ::= <Key:String> ParameterOb; + * @production ParameterTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link ParameterOb}</span>; */ public class ParameterTuple extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class ParameterTuple extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Key", "ParameterObject"}, - type = {"String", "ParameterObject"}, + name = {"Key", "ParameterOb"}, + type = {"String", "ParameterOb"}, kind = {"Token", "Child"} ) - public ParameterTuple(String p0, ParameterObject p1) { + public ParameterTuple(String p0, ParameterOb p1) { setKey(p0); setChild(p1, 0); } @@ -178,30 +178,30 @@ public class ParameterTuple extends ASTNode<ASTNode> implements Cloneable { return tokenString_Key != null ? tokenString_Key : ""; } /** - * Replaces the ParameterObject child. - * @param node The new node to replace the ParameterObject child. + * Replaces the ParameterOb child. + * @param node The new node to replace the ParameterOb child. * @apilevel high-level */ - public void setParameterObject(ParameterObject node) { + public void setParameterOb(ParameterOb node) { setChild(node, 0); } /** - * Retrieves the ParameterObject child. - * @return The current node used as the ParameterObject child. + * Retrieves the ParameterOb child. + * @return The current node used as the ParameterOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="ParameterObject") - public ParameterObject getParameterObject() { - return (ParameterObject) getChild(0); + @ASTNodeAnnotation.Child(name="ParameterOb") + public ParameterOb getParameterOb() { + return (ParameterOb) getChild(0); } /** - * Retrieves the ParameterObject child. + * Retrieves the ParameterOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the ParameterObject child. + * @return The current node used as the ParameterOb child. * @apilevel low-level */ - public ParameterObject getParameterObjectNoTransform() { - return (ParameterObject) getChildNoTransform(0); + public ParameterOb getParameterObNoTransform() { + return (ParameterOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode 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 5da08d8e809b409004e32b0d262a5da2c0c0755c..a33d35ce63c6f32af537bdd68c063ec22cc5d7e9 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:117 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:135 * @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 f15b7331a261ee48db55625b33c17cc7ff5f4092..4b6e92104e428de82febb22de0f7169541588a28 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:45 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:47 * @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/PathItemOb.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItemOb.java new file mode 100644 index 0000000000000000000000000000000000000000..bb829c9148490cf9e7eb5d42e20e236a171b7271 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItemOb.java @@ -0,0 +1,227 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:38 + * @astdecl PathItemOb : ASTNode; + * @production PathItemOb : {@link ASTNode}; + + */ +public abstract class PathItemOb extends ASTNode<ASTNode> implements Cloneable { + /** + * @aspect Composer + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:272 + */ + public static Path composePath (PathItem pathItem){ + Path path = new Path(); + + 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( pathItem.getNumParameterObject() != 0 ){ + for( ParameterObject p : pathItem.getParameterObjects() ) + path.addParameter( ParameterObject.composeParameter(p) ); + } + if( pathItem.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : pathItem.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + path.setExtensions(extensionMap); + } + + return path; + } + /** + * @aspect Parser + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:277 + */ + public static PathItem parsePath(Path path){ + PathItem pathItem = new PathItem(); + + if( path.getRef() != null ) + pathItem.setRef(path.getRef()); + if( path.getSummary() != null ) + pathItem.setSummary(path.getSummary()); + if( path.getDescription() != null ) + pathItem.setDescription(path.getDescription()); + if( path.getGet() != null ){ + Get get = new Get(); + get.setOperationObject( OperationObject.parseOperation( path.getGet() ) ); + pathItem.setGet(get); + } + if( path.getPut() != null ){ + Put put = new Put(); + put.setOperationObject( OperationObject.parseOperation( path.getPut() ) ); + pathItem.setPut(put); + } + if( path.getPost() != null ){ + Post post = new Post(); + post.setOperationObject( OperationObject.parseOperation( path.getPost() ) ); + pathItem.setPost(post); + } + if( path.getDelete() != null ){ + Delete delete = new Delete(); + delete.setOperationObject( OperationObject.parseOperation( path.getDelete() ) ); + pathItem.setDelete(delete); + } + if( path.getOptions() != null ){ + Options options = new Options(); + options.setOperationObject( OperationObject.parseOperation( path.getOptions() ) ); + pathItem.setOptions(options); + } + if( path.getHead() != null ){ + Head head = new Head(); + head.setOperationObject( OperationObject.parseOperation( path.getHead() ) ); + pathItem.setHead(head); + } + if( path.getPatch() != null ){ + Patch patch = new Patch(); + patch.setOperationObject( OperationObject.parseOperation( path.getPatch() ) ); + pathItem.setPatch(patch); + } + if( path.getTrace() != null ){ + Trace trace = new Trace(); + trace.setOperationObject( OperationObject.parseOperation( path.getTrace() ) ); + pathItem.setTrace(trace); + } + if( path.getServers() != null ){ + for(Server s : path.getServers()) + 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()); + pathItem.addParameterObject(parameterObject); + } + else + pathItem.addParameterObject(ParameterObject.parseParameter(p)); + } + } + if( path.getExtensions() != null ){ + for( String key : path.getExtensions().keySet() ) + pathItem.addExtension(new Extension(key, path.getExtensions().get(key))); + } + + return pathItem; + } + /** + * @declaredat ASTNode:1 + */ + public PathItemOb() { + 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 PathItemOb clone() throws CloneNotSupportedException { + PathItemOb node = (PathItemOb) 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 PathItemOb 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 PathItemOb 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 PathItemOb 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/PathItem.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItemObject.java similarity index 78% rename from src/gen/java/de/tudresden/inf/st/openapi/ast/PathItem.java rename to src/gen/java/de/tudresden/inf/st/openapi/ast/PathItemObject.java index ee345e6a2fec4d62c77cd5e4705ae49fe6a00ee4..4638b5951c08a26229997ae4e25223a6698fe10a 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItem.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItemObject.java @@ -17,137 +17,16 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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* ParameterOb* Extension*; - * @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 ParameterOb}*</span> <span class="component">{@link Extension}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:40 + * @astdecl PathItemObject : PathItemOb ::= <Summary:String> <Description:String> [Get] [Put] [Post] [Delete] [Options] [Head] [Patch] [Trace] ServerObject* ParameterOb* Extension*; + * @production PathItemObject : {@link PathItemOb} ::= <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 ParameterOb}*</span> <span class="component">{@link Extension}*</span>; */ -public class PathItem extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:272 - */ - public static Path composePath (PathItem pathItem){ - Path path = new Path(); - - - 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( pathItem.getNumParameterObject() != 0 ){ - for( ParameterObject p : pathItem.getParameterObjects() ) - path.addParameter( ParameterObject.composeParameter(p) ); - } - if( pathItem.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : pathItem.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - path.setExtensions(extensionMap); - } - - return path; - } - /** - * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:277 - */ - public static PathItem parsePath(Path path){ - PathItem pathItem = new PathItem(); - - - if( path.getRef() != null ) - pathItem.setRef(path.getRef()); - if( path.getSummary() != null ) - pathItem.setSummary(path.getSummary()); - if( path.getDescription() != null ) - pathItem.setDescription(path.getDescription()); - if( path.getGet() != null ){ - Get get = new Get(); - get.setOperationObject( OperationObject.parseOperation( path.getGet() ) ); - pathItem.setGet(get); - } - if( path.getPut() != null ){ - Put put = new Put(); - put.setOperationObject( OperationObject.parseOperation( path.getPut() ) ); - pathItem.setPut(put); - } - if( path.getPost() != null ){ - Post post = new Post(); - post.setOperationObject( OperationObject.parseOperation( path.getPost() ) ); - pathItem.setPost(post); - } - if( path.getDelete() != null ){ - Delete delete = new Delete(); - delete.setOperationObject( OperationObject.parseOperation( path.getDelete() ) ); - pathItem.setDelete(delete); - } - if( path.getOptions() != null ){ - Options options = new Options(); - options.setOperationObject( OperationObject.parseOperation( path.getOptions() ) ); - pathItem.setOptions(options); - } - if( path.getHead() != null ){ - Head head = new Head(); - head.setOperationObject( OperationObject.parseOperation( path.getHead() ) ); - pathItem.setHead(head); - } - if( path.getPatch() != null ){ - Patch patch = new Patch(); - patch.setOperationObject( OperationObject.parseOperation( path.getPatch() ) ); - pathItem.setPatch(patch); - } - if( path.getTrace() != null ){ - Trace trace = new Trace(); - trace.setOperationObject( OperationObject.parseOperation( path.getTrace() ) ); - pathItem.setTrace(trace); - } - if( path.getServers() != null ){ - for(Server s : path.getServers()) - 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()); - pathItem.addParameterObject(parameterObject); - } - else - pathItem.addParameterObject(ParameterObject.parseParameter(p)); - } - } - if( path.getExtensions() != null ){ - for( String key : path.getExtensions().keySet() ) - pathItem.addExtension(new Extension(key, path.getExtensions().get(key))); - } - - return pathItem; - } +public class PathItemObject extends PathItemOb implements Cloneable { /** * @declaredat ASTNode:1 */ - public PathItem() { + public PathItemObject() { super(); } /** @@ -175,64 +54,63 @@ public class PathItem extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:24 */ @ASTNodeAnnotation.Constructor( - name = {"Ref", "Summary", "Description", "Get", "Put", "Post", "Delete", "Options", "Head", "Patch", "Trace", "ServerObject", "ParameterOb", "Extension"}, - type = {"String", "String", "String", "Opt<Get>", "Opt<Put>", "Opt<Post>", "Opt<Delete>", "Opt<Options>", "Opt<Head>", "Opt<Patch>", "Opt<Trace>", "JastAddList<ServerObject>", "JastAddList<ParameterOb>", "JastAddList<Extension>"}, - kind = {"Token", "Token", "Token", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "List", "List", "List"} + name = {"Summary", "Description", "Get", "Put", "Post", "Delete", "Options", "Head", "Patch", "Trace", "ServerObject", "ParameterOb", "Extension"}, + type = {"String", "String", "Opt<Get>", "Opt<Put>", "Opt<Post>", "Opt<Delete>", "Opt<Options>", "Opt<Head>", "Opt<Patch>", "Opt<Trace>", "JastAddList<ServerObject>", "JastAddList<ParameterOb>", "JastAddList<Extension>"}, + kind = {"Token", "Token", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "List", "List", "List"} ) - 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<ParameterOb> p12, JastAddList<Extension> p13) { - setRef(p0); - setSummary(p1); - setDescription(p2); - setChild(p3, 0); - setChild(p4, 1); - setChild(p5, 2); - setChild(p6, 3); - setChild(p7, 4); - setChild(p8, 5); - setChild(p9, 6); - setChild(p10, 7); - setChild(p11, 8); - setChild(p12, 9); - setChild(p13, 10); + public PathItemObject(String p0, String p1, Opt<Get> p2, Opt<Put> p3, Opt<Post> p4, Opt<Delete> p5, Opt<Options> p6, Opt<Head> p7, Opt<Patch> p8, Opt<Trace> p9, JastAddList<ServerObject> p10, JastAddList<ParameterOb> p11, JastAddList<Extension> p12) { + setSummary(p0); + setDescription(p1); + setChild(p2, 0); + setChild(p3, 1); + setChild(p4, 2); + setChild(p5, 3); + setChild(p6, 4); + setChild(p7, 5); + setChild(p8, 6); + setChild(p9, 7); + setChild(p10, 8); + setChild(p11, 9); + setChild(p12, 10); } /** @apilevel low-level - * @declaredat ASTNode:46 + * @declaredat ASTNode:45 */ protected int numChildren() { return 11; } /** * @apilevel internal - * @declaredat ASTNode:52 + * @declaredat ASTNode:51 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:56 + * @declaredat ASTNode:55 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:60 + * @declaredat ASTNode:59 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:64 + * @declaredat ASTNode:63 */ - public PathItem clone() throws CloneNotSupportedException { - PathItem node = (PathItem) super.clone(); + public PathItemObject clone() throws CloneNotSupportedException { + PathItemObject node = (PathItemObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:69 + * @declaredat ASTNode:68 */ - public PathItem copy() { + public PathItemObject copy() { try { - PathItem node = (PathItem) clone(); + PathItemObject node = (PathItemObject) clone(); node.parent = null; if (children != null) { node.children = (ASTNode[]) children.clone(); @@ -248,10 +126,10 @@ public class PathItem 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:88 + * @declaredat ASTNode:87 */ @Deprecated - public PathItem fullCopy() { + public PathItemObject fullCopy() { return treeCopyNoTransform(); } /** @@ -259,10 +137,10 @@ public class PathItem 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:97 */ - public PathItem treeCopyNoTransform() { - PathItem tree = (PathItem) copy(); + public PathItemObject treeCopyNoTransform() { + PathItemObject tree = (PathItemObject) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; @@ -280,10 +158,10 @@ public class PathItem 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:118 + * @declaredat ASTNode:117 */ - public PathItem treeCopy() { - PathItem tree = (PathItem) copy(); + public PathItemObject treeCopy() { + PathItemObject tree = (PathItemObject) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) getChild(i); @@ -296,30 +174,10 @@ public class PathItem extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:132 + * @declaredat ASTNode:131 */ protected boolean is$Equal(ASTNode node) { - 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. - * @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 : ""; + return super.is$Equal(node) && (tokenString_Summary == ((PathItemObject) node).tokenString_Summary) && (tokenString_Description == ((PathItemObject) node).tokenString_Description); } /** * Replaces the lexeme Summary. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItemReference.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItemReference.java new file mode 100644 index 0000000000000000000000000000000000000000..326768a56d4b1c1444a6852424571a40a3a0c45a --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItemReference.java @@ -0,0 +1,207 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:39 + * @astdecl PathItemReference : PathItemOb ::= <Ref:String> <PathItemObject:PathItemObject>; + * @production PathItemReference : {@link PathItemOb} ::= <span class="component"><Ref:String></span> <span class="component"><PathItemObject:PathItemObject></span>; + + */ +public class PathItemReference extends PathItemOb implements Cloneable { + /** + * @declaredat ASTNode:1 + */ + public PathItemReference() { + 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 = {"Ref", "PathItemObject"}, + type = {"String", "PathItemObject"}, + kind = {"Token", "Token"} + ) + public PathItemReference(String p0, PathItemObject p1) { + setRef(p0); + setPathItemObject(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 PathItemReference clone() throws CloneNotSupportedException { + PathItemReference node = (PathItemReference) super.clone(); + return node; + } + /** @apilevel internal + * @declaredat ASTNode:45 + */ + public PathItemReference copy() { + try { + PathItemReference node = (PathItemReference) 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 PathItemReference 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 PathItemReference treeCopyNoTransform() { + PathItemReference tree = (PathItemReference) 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 PathItemReference treeCopy() { + PathItemReference tree = (PathItemReference) 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_Ref == ((PathItemReference) node).tokenString_Ref) && (tokenPathItemObject_PathItemObject == ((PathItemReference) node).tokenPathItemObject_PathItemObject); + } + /** + * 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 : ""; + } + /** + * Replaces the lexeme PathItemObject. + * @param value The new value for the lexeme PathItemObject. + * @apilevel high-level + */ + public void setPathItemObject(PathItemObject value) { + tokenPathItemObject_PathItemObject = value; + } + /** @apilevel internal + */ + protected PathItemObject tokenPathItemObject_PathItemObject; + /** + * Retrieves the value for the lexeme PathItemObject. + * @return The value for the lexeme PathItemObject. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="PathItemObject") + public PathItemObject getPathItemObject() { + return tokenPathItemObject_PathItemObject; + } + /** @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/PathsObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathsObject.java index be5e5fdd39d28fe7c521ac9c4a045d68fa34c97c..5f884e1682cafdbd4c4cb32b2c33832b19b0f143 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 @@ -17,15 +17,15 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:35 + * @astdecl PathsObject : ASTNode ::= <Ref:String> PathItemOb; + * @production PathsObject : {@link ASTNode} ::= <span class="component"><Ref:String></span> <span class="component">{@link PathItemOb}</span>; */ public class PathsObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect RandomRequestGenerator - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/RandomRequestGenerator.jadd:40 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\RandomRequestGenerator.jadd:40 */ public void sendRandomRequests(String baseUrl) throws Exception { if( this.getPathItem().hasGet() ){ @@ -66,11 +66,11 @@ public class PathsObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Ref", "PathItem"}, - type = {"String", "PathItem"}, + name = {"Ref", "PathItemOb"}, + type = {"String", "PathItemOb"}, kind = {"Token", "Child"} ) - public PathsObject(String p0, PathItem p1) { + public PathsObject(String p0, PathItemOb p1) { setRef(p0); setChild(p1, 0); } @@ -201,30 +201,30 @@ public class PathsObject extends ASTNode<ASTNode> implements Cloneable { return tokenString_Ref != null ? tokenString_Ref : ""; } /** - * Replaces the PathItem child. - * @param node The new node to replace the PathItem child. + * Replaces the PathItemOb child. + * @param node The new node to replace the PathItemOb child. * @apilevel high-level */ - public void setPathItem(PathItem node) { + public void setPathItemOb(PathItemOb node) { setChild(node, 0); } /** - * Retrieves the PathItem child. - * @return The current node used as the PathItem child. + * Retrieves the PathItemOb child. + * @return The current node used as the PathItemOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="PathItem") - public PathItem getPathItem() { - return (PathItem) getChild(0); + @ASTNodeAnnotation.Child(name="PathItemOb") + public PathItemOb getPathItemOb() { + return (PathItemOb) getChild(0); } /** - * Retrieves the PathItem child. + * Retrieves the PathItemOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the PathItem child. + * @return The current node used as the PathItemOb child. * @apilevel low-level */ - public PathItem getPathItemNoTransform() { - return (PathItem) getChildNoTransform(0); + public PathItemOb getPathItemObNoTransform() { + return (PathItemOb) 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 8be3e48df3d49d53e84b88c7741e42537306a1af..41d7ba13c07a6a2786241d2a2ecc2e30883c2f1b 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:41 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:43 * @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 6eda0cf63aff4f473c0e8116f13993f85be5e592..11558a0ddf76beaab5316cee74eb87f50240ab75 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 @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:98 - * @astdecl PropertyItem : ASTNode ::= <Name:String> SchemaObject; - * @production PropertyItem : {@link ASTNode} ::= <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:114 + * @astdecl PropertyItem : ASTNode ::= <Name:String> SchemaOb; + * @production PropertyItem : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component">{@link SchemaOb}</span>; */ public class PropertyItem extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class PropertyItem extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "SchemaObject"}, - type = {"String", "SchemaObject"}, + name = {"Name", "SchemaOb"}, + type = {"String", "SchemaOb"}, kind = {"Token", "Child"} ) - public PropertyItem(String p0, SchemaObject p1) { + public PropertyItem(String p0, SchemaOb p1) { setName(p0); setChild(p1, 0); } @@ -178,30 +178,30 @@ public class PropertyItem extends ASTNode<ASTNode> implements Cloneable { return tokenString_Name != null ? tokenString_Name : ""; } /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. + * Replaces the SchemaOb child. + * @param node The new node to replace the SchemaOb child. * @apilevel high-level */ - public void setSchemaObject(SchemaObject node) { + public void setSchemaOb(SchemaOb node) { setChild(node, 0); } /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. + * Retrieves the SchemaOb child. + * @return The current node used as the SchemaOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); + @ASTNodeAnnotation.Child(name="SchemaOb") + public SchemaOb getSchemaOb() { + return (SchemaOb) getChild(0); } /** - * Retrieves the SchemaObject child. + * Retrieves the SchemaOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. + * @return The current node used as the SchemaOb child. * @apilevel low-level */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); + public SchemaOb getSchemaObNoTransform() { + return (SchemaOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 0ba71e40c02c0075c3258d332b24016963bab04b..9e0b5f65a88915a2e6beb56d3487a0541509d3d5 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:40 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:42 * @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/RequestBodyOb.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyOb.java new file mode 100644 index 0000000000000000000000000000000000000000..fa51fae2c24832b639b32eb1ccad1e1a9a46c36a --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyOb.java @@ -0,0 +1,150 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:64 + * @astdecl RequestBodyOb : ASTNode; + * @production RequestBodyOb : {@link ASTNode}; + + */ +public abstract class RequestBodyOb extends ASTNode<ASTNode> implements Cloneable { + /** + * @aspect Composer + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:439 + */ + 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(); + + 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()); + + return requestBody; + } + /** + * @aspect Parser + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:456 + */ + 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 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()); + + return requestBodyObject; + } + /** + * @declaredat ASTNode:1 + */ + public RequestBodyOb() { + 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 RequestBodyOb clone() throws CloneNotSupportedException { + RequestBodyOb node = (RequestBodyOb) 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 RequestBodyOb 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 RequestBodyOb 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 RequestBodyOb 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 d07551c91f38bfe09253802376981484251a06d3..3bf4477504f5a9eb7e1ccbac479ec7ac947649d3 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 @@ -17,54 +17,12 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:62 - * @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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:66 + * @astdecl RequestBodyObject : RequestBodyOb ::= <Description:String> ContentTuple* <Required:Boolean>; + * @production RequestBodyObject : {@link RequestBodyOb} ::= <span class="component"><Description:String></span> <span class="component">{@link ContentTuple}*</span> <span class="component"><Required:Boolean></span>; */ -public class RequestBodyObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:440 - */ - 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(); - - 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()); - - return requestBody; - } - /** - * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:457 - */ - 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 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()); - - return requestBodyObject; - } +public class RequestBodyObject extends RequestBodyOb implements Cloneable { /** * @declaredat ASTNode:1 */ @@ -86,50 +44,49 @@ public class RequestBodyObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:14 */ @ASTNodeAnnotation.Constructor( - name = {"Description", "ContentTuple", "Required", "Ref"}, - type = {"String", "JastAddList<ContentTuple>", "Boolean", "String"}, - kind = {"Token", "List", "Token", "Token"} + name = {"Description", "ContentTuple", "Required"}, + type = {"String", "JastAddList<ContentTuple>", "Boolean"}, + kind = {"Token", "List", "Token"} ) - public RequestBodyObject(String p0, JastAddList<ContentTuple> p1, Boolean p2, String p3) { + public RequestBodyObject(String p0, JastAddList<ContentTuple> p1, Boolean p2) { setDescription(p0); setChild(p1, 0); setRequired(p2); - setRef(p3); } /** @apilevel low-level - * @declaredat ASTNode:26 + * @declaredat ASTNode:25 */ protected int numChildren() { return 1; } /** * @apilevel internal - * @declaredat ASTNode:32 + * @declaredat ASTNode:31 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:36 + * @declaredat ASTNode:35 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:40 + * @declaredat ASTNode:39 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:44 + * @declaredat ASTNode:43 */ public RequestBodyObject clone() throws CloneNotSupportedException { RequestBodyObject node = (RequestBodyObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:49 + * @declaredat ASTNode:48 */ public RequestBodyObject copy() { try { @@ -149,7 +106,7 @@ public class RequestBodyObject 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:67 */ @Deprecated public RequestBodyObject fullCopy() { @@ -160,7 +117,7 @@ public class RequestBodyObject 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:77 */ public RequestBodyObject treeCopyNoTransform() { RequestBodyObject tree = (RequestBodyObject) copy(); @@ -181,7 +138,7 @@ public class RequestBodyObject 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:97 */ public RequestBodyObject treeCopy() { RequestBodyObject tree = (RequestBodyObject) copy(); @@ -197,10 +154,10 @@ public class RequestBodyObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:112 + * @declaredat ASTNode:111 */ protected boolean is$Equal(ASTNode node) { - return super.is$Equal(node) && (tokenString_Description == ((RequestBodyObject) node).tokenString_Description) && (tokenBoolean_Required == ((RequestBodyObject) node).tokenBoolean_Required) && (tokenString_Ref == ((RequestBodyObject) node).tokenString_Ref); + return super.is$Equal(node) && (tokenString_Description == ((RequestBodyObject) node).tokenString_Description) && (tokenBoolean_Required == ((RequestBodyObject) node).tokenBoolean_Required); } /** * Replaces the lexeme Description. @@ -352,26 +309,6 @@ public class RequestBodyObject extends ASTNode<ASTNode> implements Cloneable { public Boolean getRequired() { return tokenBoolean_Required; } - /** - * 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/RequestBodyReference.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyReference.java new file mode 100644 index 0000000000000000000000000000000000000000..5ed20f8b6b59803f816c45d8cff2618f09ab1514 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyReference.java @@ -0,0 +1,207 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:65 + * @astdecl RequestBodyReference : RequestBodyOb ::= <Ref:String> <RequestBodyObject:RequestBodyObject>; + * @production RequestBodyReference : {@link RequestBodyOb} ::= <span class="component"><Ref:String></span> <span class="component"><RequestBodyObject:RequestBodyObject></span>; + + */ +public class RequestBodyReference extends RequestBodyOb implements Cloneable { + /** + * @declaredat ASTNode:1 + */ + public RequestBodyReference() { + 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 = {"Ref", "RequestBodyObject"}, + type = {"String", "RequestBodyObject"}, + kind = {"Token", "Token"} + ) + public RequestBodyReference(String p0, RequestBodyObject p1) { + setRef(p0); + setRequestBodyObject(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 RequestBodyReference clone() throws CloneNotSupportedException { + RequestBodyReference node = (RequestBodyReference) super.clone(); + return node; + } + /** @apilevel internal + * @declaredat ASTNode:45 + */ + public RequestBodyReference copy() { + try { + RequestBodyReference node = (RequestBodyReference) 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 RequestBodyReference 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 RequestBodyReference treeCopyNoTransform() { + RequestBodyReference tree = (RequestBodyReference) 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 RequestBodyReference treeCopy() { + RequestBodyReference tree = (RequestBodyReference) 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_Ref == ((RequestBodyReference) node).tokenString_Ref) && (tokenRequestBodyObject_RequestBodyObject == ((RequestBodyReference) node).tokenRequestBodyObject_RequestBodyObject); + } + /** + * 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 : ""; + } + /** + * Replaces the lexeme RequestBodyObject. + * @param value The new value for the lexeme RequestBodyObject. + * @apilevel high-level + */ + public void setRequestBodyObject(RequestBodyObject value) { + tokenRequestBodyObject_RequestBodyObject = value; + } + /** @apilevel internal + */ + protected RequestBodyObject tokenRequestBodyObject_RequestBodyObject; + /** + * Retrieves the value for the lexeme RequestBodyObject. + * @return The value for the lexeme RequestBodyObject. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="RequestBodyObject") + public RequestBodyObject getRequestBodyObject() { + return tokenRequestBodyObject_RequestBodyObject; + } + /** @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/RequestBodyTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyTuple.java index cb5ffb415132c716e727fc2be086e7f765f9c14b..2625037aa2412896a2570e1e77c285e50d338925 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyTuple.java @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:27 + * @astdecl RequestBodyTuple : ASTNode ::= <Key:String> RequestBodyOb; + * @production RequestBodyTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link RequestBodyOb}</span>; */ public class RequestBodyTuple extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class RequestBodyTuple extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Key", "RequestBodyObject"}, - type = {"String", "RequestBodyObject"}, + name = {"Key", "RequestBodyOb"}, + type = {"String", "RequestBodyOb"}, kind = {"Token", "Child"} ) - public RequestBodyTuple(String p0, RequestBodyObject p1) { + public RequestBodyTuple(String p0, RequestBodyOb p1) { setKey(p0); setChild(p1, 0); } @@ -178,30 +178,30 @@ public class RequestBodyTuple extends ASTNode<ASTNode> implements Cloneable { return tokenString_Key != null ? tokenString_Key : ""; } /** - * Replaces the RequestBodyObject child. - * @param node The new node to replace the RequestBodyObject child. + * Replaces the RequestBodyOb child. + * @param node The new node to replace the RequestBodyOb child. * @apilevel high-level */ - public void setRequestBodyObject(RequestBodyObject node) { + public void setRequestBodyOb(RequestBodyOb node) { setChild(node, 0); } /** - * Retrieves the RequestBodyObject child. - * @return The current node used as the RequestBodyObject child. + * Retrieves the RequestBodyOb child. + * @return The current node used as the RequestBodyOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="RequestBodyObject") - public RequestBodyObject getRequestBodyObject() { - return (RequestBodyObject) getChild(0); + @ASTNodeAnnotation.Child(name="RequestBodyOb") + public RequestBodyOb getRequestBodyOb() { + return (RequestBodyOb) getChild(0); } /** - * Retrieves the RequestBodyObject child. + * Retrieves the RequestBodyOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the RequestBodyObject child. + * @return The current node used as the RequestBodyOb child. * @apilevel low-level */ - public RequestBodyObject getRequestBodyObjectNoTransform() { - return (RequestBodyObject) getChildNoTransform(0); + public RequestBodyOb getRequestBodyObNoTransform() { + return (RequestBodyOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 540c8d7f44c10a6d3e1f8dca56235586c80bb9a0..04531978b13958bd9df2e7adebb5869baf41bf57 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:99 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:115 * @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/ResponseOb.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseOb.java new file mode 100644 index 0000000000000000000000000000000000000000..b9d489a61dc33d866f5223bed95e19ff69955108 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseOb.java @@ -0,0 +1,166 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:76 + * @astdecl ResponseOb : ASTNode; + * @production ResponseOb : {@link ASTNode}; + + */ +public abstract class ResponseOb extends ASTNode<ASTNode> implements Cloneable { + /** + * @aspect Composer + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:506 + */ + public static Response composeResponse (ResponseObject responseObject){ + Response response = new Response(); + + 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( 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(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); + response.setContentMediaTypes(contents); + } + if( responseObject.getNumLinkTuple() != 0 ){ + Map<String, Link> links = new HashMap<>(); + for( LinkTuple t : responseObject.getLinkTuples() ) + links.put(t.getKey(), LinkObject.composeLink(t.getLinkObject())); + response.setLinks(links); + } + + return response; + } + /** + * @aspect Parser + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:513 + */ + public static ResponseObject parseResponse(Response response){ + ResponseObject responseObject = new ResponseObject(); + + 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.addHeaderTuple( new HeaderTuple(key, HeaderObject.parseHeader(response.getHeader(key))) ); + } + if( response.getContentMediaTypes() != null ){ + for( String key : response.getContentMediaTypes().keySet() ) + responseObject.addContentTuple( new ContentTuple(key, MediaTypeObject.parseMediaType(response.getContentMediaType(key))) ); + } + if( response.getLinks() != null ){ + for( String key : response.getLinks().keySet() ) + responseObject.addLinkTuple( new LinkTuple(key, LinkObject.parseLink(response.getLink(key))) ); + } + + return responseObject; + } + /** + * @declaredat ASTNode:1 + */ + public ResponseOb() { + 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 ResponseOb clone() throws CloneNotSupportedException { + ResponseOb node = (ResponseOb) 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 ResponseOb 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 ResponseOb 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 ResponseOb 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/ResponseObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObject.java index 10f956eb4fa76d4f84788d7bc215ebbb53193154..fe2872938f383e96bce004c9bb810a381b731473 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 @@ -17,70 +17,12 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:72 - * @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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:78 + * @astdecl ResponseObject : ResponseOb ::= <Description:String> HeaderTuple* ContentTuple* LinkTuple* Extension*; + * @production ResponseObject : {@link ResponseOb} ::= <span class="component"><Description:String></span> <span class="component">{@link HeaderTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component">{@link LinkTuple}*</span> <span class="component">{@link Extension}*</span>; */ -public class ResponseObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:507 - */ - public static Response composeResponse (ResponseObject responseObject){ - Response response = new Response(); - - 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( 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(t.getKey(), MediaTypeObject.composeMediaType(t.getMediaTypeObject())); - response.setContentMediaTypes(contents); - } - if( responseObject.getNumLinkTuple() != 0 ){ - Map<String, Link> links = new HashMap<>(); - 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:514 - */ - public static ResponseObject parseResponse(Response response){ - ResponseObject responseObject = new ResponseObject(); - - 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.addHeaderTuple( new HeaderTuple(key, HeaderObject.parseHeader(response.getHeader(key))) ); - } - if( response.getContentMediaTypes() != null ){ - for( String key : response.getContentMediaTypes().keySet() ) - responseObject.addContentTuple( new ContentTuple(key, MediaTypeObject.parseMediaType(response.getContentMediaType(key))) ); - } - if( response.getLinks() != null ){ - for( String key : response.getLinks().keySet() ) - responseObject.addLinkTuple( new LinkTuple(key, LinkObject.parseLink(response.getLink(key))) ); - } - - return responseObject; - } +public class ResponseObject extends ResponseOb implements Cloneable { /** * @declaredat ASTNode:1 */ @@ -95,60 +37,61 @@ public class ResponseObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[3]; + children = new ASTNode[4]; setChild(new JastAddList(), 0); setChild(new JastAddList(), 1); setChild(new JastAddList(), 2); + setChild(new JastAddList(), 3); } /** - * @declaredat ASTNode:16 + * @declaredat ASTNode:17 */ @ASTNodeAnnotation.Constructor( - name = {"Ref", "Description", "HeaderTuple", "ContentTuple", "LinkTuple"}, - type = {"String", "String", "JastAddList<HeaderTuple>", "JastAddList<ContentTuple>", "JastAddList<LinkTuple>"}, - kind = {"Token", "Token", "List", "List", "List"} + name = {"Description", "HeaderTuple", "ContentTuple", "LinkTuple", "Extension"}, + type = {"String", "JastAddList<HeaderTuple>", "JastAddList<ContentTuple>", "JastAddList<LinkTuple>", "JastAddList<Extension>"}, + kind = {"Token", "List", "List", "List", "List"} ) - 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); - setChild(p4, 2); + public ResponseObject(String p0, JastAddList<HeaderTuple> p1, JastAddList<ContentTuple> p2, JastAddList<LinkTuple> p3, JastAddList<Extension> p4) { + setDescription(p0); + setChild(p1, 0); + setChild(p2, 1); + setChild(p3, 2); + setChild(p4, 3); } /** @apilevel low-level - * @declaredat ASTNode:29 + * @declaredat ASTNode:30 */ protected int numChildren() { - return 3; + return 4; } /** * @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 ResponseObject clone() throws CloneNotSupportedException { ResponseObject node = (ResponseObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:52 + * @declaredat ASTNode:53 */ public ResponseObject copy() { try { @@ -168,7 +111,7 @@ public class ResponseObject 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 ResponseObject fullCopy() { @@ -179,7 +122,7 @@ public class ResponseObject 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 ResponseObject treeCopyNoTransform() { ResponseObject tree = (ResponseObject) copy(); @@ -200,7 +143,7 @@ public class ResponseObject 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 ResponseObject treeCopy() { ResponseObject tree = (ResponseObject) copy(); @@ -216,30 +159,10 @@ public class ResponseObject 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_Ref == ((ResponseObject) node).tokenString_Ref) && (tokenString_Description == ((ResponseObject) node).tokenString_Description); - } - /** - * 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 : ""; + return super.is$Equal(node) && (tokenString_Description == ((ResponseObject) node).tokenString_Description); } /** * Replaces the lexeme Description. @@ -591,6 +514,116 @@ public class ResponseObject extends ASTNode<ASTNode> implements Cloneable { public JastAddList<LinkTuple> getLinkTuplesNoTransform() { return getLinkTupleListNoTransform(); } + /** + * 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, 3); + } + /** + * 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(3); + 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(3); + } + /** + * @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(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseReference.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseReference.java new file mode 100644 index 0000000000000000000000000000000000000000..6cbb24014aa4a800e4ea206a463d87f7be767ea8 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseReference.java @@ -0,0 +1,207 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:77 + * @astdecl ResponseReference : ResponseOb ::= <Ref:String> <ResponseObject:ResponseObject>; + * @production ResponseReference : {@link ResponseOb} ::= <span class="component"><Ref:String></span> <span class="component"><ResponseObject:ResponseObject></span>; + + */ +public class ResponseReference extends ResponseOb implements Cloneable { + /** + * @declaredat ASTNode:1 + */ + public ResponseReference() { + 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 = {"Ref", "ResponseObject"}, + type = {"String", "ResponseObject"}, + kind = {"Token", "Token"} + ) + public ResponseReference(String p0, ResponseObject p1) { + setRef(p0); + setResponseObject(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 ResponseReference clone() throws CloneNotSupportedException { + ResponseReference node = (ResponseReference) super.clone(); + return node; + } + /** @apilevel internal + * @declaredat ASTNode:45 + */ + public ResponseReference copy() { + try { + ResponseReference node = (ResponseReference) 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 ResponseReference 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 ResponseReference treeCopyNoTransform() { + ResponseReference tree = (ResponseReference) 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 ResponseReference treeCopy() { + ResponseReference tree = (ResponseReference) 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_Ref == ((ResponseReference) node).tokenString_Ref) && (tokenResponseObject_ResponseObject == ((ResponseReference) node).tokenResponseObject_ResponseObject); + } + /** + * 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 : ""; + } + /** + * Replaces the lexeme ResponseObject. + * @param value The new value for the lexeme ResponseObject. + * @apilevel high-level + */ + public void setResponseObject(ResponseObject value) { + tokenResponseObject_ResponseObject = value; + } + /** @apilevel internal + */ + protected ResponseObject tokenResponseObject_ResponseObject; + /** + * Retrieves the value for the lexeme ResponseObject. + * @return The value for the lexeme ResponseObject. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="ResponseObject") + public ResponseObject getResponseObject() { + return tokenResponseObject_ResponseObject; + } + /** @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/ResponseTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseTuple.java index c63c595034ea7e351edb3faa85a9e598c1cbaf8c..1bf00691c44d70047ef200f524e90817d11f2b87 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseTuple.java @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:24 + * @astdecl ResponseTuple : ASTNode ::= <Key:String> ResponseOb; + * @production ResponseTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link ResponseOb}</span>; */ public class ResponseTuple extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class ResponseTuple extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Key", "ResponseObject"}, - type = {"String", "ResponseObject"}, + name = {"Key", "ResponseOb"}, + type = {"String", "ResponseOb"}, kind = {"Token", "Child"} ) - public ResponseTuple(String p0, ResponseObject p1) { + public ResponseTuple(String p0, ResponseOb p1) { setKey(p0); setChild(p1, 0); } @@ -178,30 +178,30 @@ public class ResponseTuple extends ASTNode<ASTNode> implements Cloneable { return tokenString_Key != null ? tokenString_Key : ""; } /** - * Replaces the ResponseObject child. - * @param node The new node to replace the ResponseObject child. + * Replaces the ResponseOb child. + * @param node The new node to replace the ResponseOb child. * @apilevel high-level */ - public void setResponseObject(ResponseObject node) { + public void setResponseOb(ResponseOb node) { setChild(node, 0); } /** - * Retrieves the ResponseObject child. - * @return The current node used as the ResponseObject child. + * Retrieves the ResponseOb child. + * @return The current node used as the ResponseOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="ResponseObject") - public ResponseObject getResponseObject() { - return (ResponseObject) getChild(0); + @ASTNodeAnnotation.Child(name="ResponseOb") + public ResponseOb getResponseOb() { + return (ResponseOb) getChild(0); } /** - * Retrieves the ResponseObject child. + * Retrieves the ResponseOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the ResponseObject child. + * @return The current node used as the ResponseOb child. * @apilevel low-level */ - public ResponseObject getResponseObjectNoTransform() { - return (ResponseObject) getChildNoTransform(0); + public ResponseOb getResponseObNoTransform() { + return (ResponseOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaOb.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaOb.java new file mode 100644 index 0000000000000000000000000000000000000000..639c66aa735aa8300c10b83ded5e7a0b80688be0 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaOb.java @@ -0,0 +1,335 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:107 + * @astdecl SchemaOb : ASTNode; + * @production SchemaOb : {@link ASTNode}; + + */ +public abstract class SchemaOb extends ASTNode<ASTNode> implements Cloneable { + /** + * @aspect Composer + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:646 + */ + 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.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(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(schemaObject.getExclusiveMaximum()); + if( schemaObject.getExclusiveMinimum() != null ) + 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(schemaObject.getMaximum()); + if( schemaObject.getMinimum() != null ) + schema.setMinimum(schemaObject.getMinimum()); + if( schemaObject.getMaxItems() != null ) + schema.setMaxItems(schemaObject.getMaxItems()); + if( schemaObject.getMinItems() != null ) + schema.setMinItems(schemaObject.getMinItems()); + if( schemaObject.getMaxLength() != null ) + schema.setMaxLength(schemaObject.getMaxLength()); + if( schemaObject.getMinLength() != null ) + schema.setMinLength(schemaObject.getMinLength()); + if( schemaObject.getMaxProperties() != null ) + schema.setMaxProperties(schemaObject.getMaxProperties()); + if( schemaObject.getMinProperties() != null ) + schema.setMinProperties(schemaObject.getMinProperties()); + if( schemaObject.getMultipleOf() != null ) + schema.setMultipleOf(schemaObject.getMultipleOf()); + if( schemaObject.hasNotSchema() ) + schema.setNotSchema(composeSchema(schemaObject.getNotSchema().getSchemaObject())); + if( schemaObject.getNullable() != null ) + schema.setNullable(schemaObject.getNullable()); + if( !schemaObject.getPattern().isEmpty() ) + schema.setPattern(schemaObject.getPattern()); + if( schemaObject.getNumPropertyItem() != 0 ){ + Map<String, org.openapi4j.parser.model.v3.Schema> properties = new HashMap<>(); + for( PropertyItem p : schemaObject.getPropertyItemList() ) + properties.put(p.getName(), composeSchema(p.getSchemaObject())); + schema.setProperties(properties); + } + if( schemaObject.getNumRequiredField() != 0 ){ + for( RequiredField r : schemaObject.getRequiredFields() ) + schema.addRequiredField(r.getValue()); + } + if( schemaObject.getNumAllOfSchema() != 0 ){ + for( AllOfSchema a : schemaObject.getAllOfSchemas() ) + schema.addAllOfSchema(composeSchema(a.getSchemaObject())); + } + if( schemaObject.getNumAnyOfSchema() != 0 ){ + for( AnyOfSchema a : schemaObject.getAnyOfSchemas() ) + schema.addAnyOfSchema(composeSchema(a.getSchemaObject())); + } + if( schemaObject.getNumOneOfSchema() != 0 ){ + for( OneOfSchema o : schemaObject.getOneOfSchemas() ) + schema.addOneOfSchema(composeSchema(o.getSchemaObject())); + } + if( schemaObject.getReadOnly() != null ) + schema.setReadOnly(schemaObject.getReadOnly()); + if( schemaObject.getWriteOnly() != null ) + 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(schemaObject.getUniqueItems()); + if( schemaObject.hasXmlObject() ) + schema.setXml(XmlObject.composeXml(schemaObject.getXmlObject())); + if( schemaObject.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : schemaObject.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + schema.setExtensions(extensionMap); + } + + return schema; + } + /** + * @aspect Parser + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:637 + */ + public static SchemaObject parseSchema (org.openapi4j.parser.model.v3.Schema schema) { + SchemaObject schemaObject = new SchemaObject(); + + if( schema.isRef() ) + schemaObject.setRef(schema.getRef()); + if( schema.getAdditionalProperties() != null ) + schemaObject.setAdditionalProperties(parseSchema(schema.getAdditionalProperties())); + if( schema.getAdditionalProperties() == null && schema.getAdditionalPropertiesAllowed() != null ) + schemaObject.setAdditionalPropertiesAllowed(schema.getAdditionalPropertiesAllowed()); + if( schema.getDefault() != null ) + schemaObject.setDefaultValue(schema.getDefault()); + if( schema.getDescription() != null ) + schemaObject.setDescription(schema.getDescription()); + if( schema.getDeprecated() != null ) + schemaObject.setDeprecatedBoolean(schema.getDeprecated()); + if( schema.getDiscriminator() != null ) + schemaObject.setDiscriminatorObject(DiscriminatorObject.parseDiscriminator(schema.getDiscriminator())); + if( schema.getEnums() != null ){ + for( Object o : schema.getEnums() ){ + EnumObj enumObj = new EnumObj(); + enumObj.setEnumOb(o); + schemaObject.addEnumObj(enumObj); + } + } + if( schema.getExample() != null ) + schemaObject.setExample(schema.getExample()); + if( schema.getExclusiveMaximum() != null ) + schemaObject.setExclusiveMaximum(schema.getExclusiveMaximum()); + if( schema.getExclusiveMinimum() != null ) + schemaObject.setExclusiveMinimum(schema.getExclusiveMinimum()); + if( schema.getExternalDocs() != null ) + schemaObject.setExternalDocObject(ExternalDocObject.parseExternalDocs(schema.getExternalDocs())); + if( schema.getFormat() != null ) + schemaObject.setFormat(schema.getFormat()); + if( schema.getItemsSchema() != null ){ + ItemsSchema itemsSchema = new ItemsSchema(); + itemsSchema.setSchemaObject(parseSchema(schema.getItemsSchema())); + schemaObject.setItemsSchema(itemsSchema); + } + if( schema.getMaximum() != null ) + schemaObject.setMaximum(schema.getMaximum()); + if( schema.getMinimum() != null ) + schemaObject.setMinimum(schema.getMinimum()); + if( schema.getMaxItems() != null ) + schemaObject.setMaxItems(schema.getMaxItems()); + if( schema.getMinItems() != null ) + schemaObject.setMinItems(schema.getMinItems()); + if( schema.getMaxLength() != null ) + schemaObject.setMaxLength(schema.getMaxLength()); + if( schema.getMinLength() != null ) + schemaObject.setMinLength(schema.getMinLength()); + if( schema.getMaxProperties() != null ) + schemaObject.setMaxProperties(schema.getMaxProperties()); + if( schema.getMinProperties() != null ) + schemaObject.setMinProperties(schema.getMinProperties()); + if( schema.getMultipleOf() != null ) + schemaObject.setMultipleOf(schema.getMultipleOf()); + if( schema.getNotSchema() != null ){ + NotSchema notSchema = new NotSchema(); + notSchema.setSchemaObject(parseSchema(schema.getNotSchema())); + schemaObject.setNotSchema(notSchema); + } + if( schema.getNullable() != null ) + schemaObject.setNullable(schema.getNullable()); + if( schema.getPattern() != null ) + schemaObject.setPattern(schema.getPattern()); + if( schema.getProperties() != null ){ + for( String key : schema.getProperties().keySet() ){ + PropertyItem propertyItem = new PropertyItem(); + schemaObject.addPropertyItem(new PropertyItem(key, parseSchema(schema.getProperty(key)))); + } + } + if( schema.getRequiredFields() != null ){ + for( String s : schema.getRequiredFields() ){ + RequiredField requiredField = new RequiredField(); + requiredField.setValue(s); + schemaObject.addRequiredField(requiredField); + } + } + if( schema.getAllOfSchemas() != null ){ + 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 ){ + 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 ){ + for(org.openapi4j.parser.model.v3.Schema schemaItem : schema.getOneOfSchemas()){ + OneOfSchema oneOfSchema = new OneOfSchema(); + oneOfSchema.setSchemaObject(parseSchema(schemaItem)); + schemaObject.addOneOfSchema(oneOfSchema); + } + } + if( schema.getReadOnly() != null ) + schemaObject.setReadOnly(schema.getReadOnly()); + if( schema.getWriteOnly() != null ) + schemaObject.setWriteOnly(schema.getWriteOnly()); + if( schema.getType() != null ) + schemaObject.setType(schema.getType()); + if( schema.getTitle() != null ) + schemaObject.setTitle(schema.getTitle()); + if( schema.getUniqueItems() != null ) + schemaObject.setUniqueItems(schema.getUniqueItems()); + if( schema.getXml() != null ) + schemaObject.setXmlObject(XmlObject.parseXml(schema.getXml())); + if( schema.getExtensions() != null ){ + for( String key : schema.getExtensions().keySet() ) + schemaObject.addExtension(new Extension(key, schema.getExtensions().get(key))); + } + + return schemaObject; + } + /** + * @declaredat ASTNode:1 + */ + public SchemaOb() { + 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 SchemaOb clone() throws CloneNotSupportedException { + SchemaOb node = (SchemaOb) 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 SchemaOb 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 SchemaOb 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 SchemaOb 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 2d2ec07d1d02192ce7eb8c7f6679c0aa4d3bd203..4ec6898123c309d30758806a813ce24b442d0013 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 @@ -17,239 +17,12 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:93 - * @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> Extension*; - * @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> <span class="component">{@link Extension}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:109 + * @astdecl SchemaObject : SchemaOb ::= <AdditionalProperties:SchemaOb> <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] Extension*; + * @production SchemaObject : {@link SchemaOb} ::= <span class="component"><AdditionalProperties:SchemaOb></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">{@link Extension}*</span>; */ -public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:647 - */ - 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.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(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(schemaObject.getExclusiveMaximum()); - if( schemaObject.getExclusiveMinimum() != null ) - 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(schemaObject.getMaximum()); - if( schemaObject.getMinimum() != null ) - schema.setMinimum(schemaObject.getMinimum()); - if( schemaObject.getMaxItems() != null ) - schema.setMaxItems(schemaObject.getMaxItems()); - if( schemaObject.getMinItems() != null ) - schema.setMinItems(schemaObject.getMinItems()); - if( schemaObject.getMaxLength() != null ) - schema.setMaxLength(schemaObject.getMaxLength()); - if( schemaObject.getMinLength() != null ) - schema.setMinLength(schemaObject.getMinLength()); - if( schemaObject.getMaxProperties() != null ) - schema.setMaxProperties(schemaObject.getMaxProperties()); - if( schemaObject.getMinProperties() != null ) - schema.setMinProperties(schemaObject.getMinProperties()); - if( schemaObject.getMultipleOf() != null ) - schema.setMultipleOf(schemaObject.getMultipleOf()); - if( schemaObject.hasNotSchema() ) - schema.setNotSchema(composeSchema(schemaObject.getNotSchema().getSchemaObject())); - if( schemaObject.getNullable() != null ) - schema.setNullable(schemaObject.getNullable()); - if( !schemaObject.getPattern().isEmpty() ) - schema.setPattern(schemaObject.getPattern()); - if( schemaObject.getNumPropertyItem() != 0 ){ - Map<String, org.openapi4j.parser.model.v3.Schema> properties = new HashMap<>(); - for( PropertyItem p : schemaObject.getPropertyItemList() ) - properties.put(p.getName(), composeSchema(p.getSchemaObject())); - schema.setProperties(properties); - } - if( schemaObject.getNumRequiredField() != 0 ){ - for( RequiredField r : schemaObject.getRequiredFields() ) - schema.addRequiredField(r.getValue()); - } - if( schemaObject.getNumAllOfSchema() != 0 ){ - for( AllOfSchema a : schemaObject.getAllOfSchemas() ) - schema.addAllOfSchema(composeSchema(a.getSchemaObject())); - } - if( schemaObject.getNumAnyOfSchema() != 0 ){ - for( AnyOfSchema a : schemaObject.getAnyOfSchemas() ) - schema.addAnyOfSchema(composeSchema(a.getSchemaObject())); - } - if( schemaObject.getNumOneOfSchema() != 0 ){ - for( OneOfSchema o : schemaObject.getOneOfSchemas() ) - schema.addOneOfSchema(composeSchema(o.getSchemaObject())); - } - if( schemaObject.getReadOnly() != null ) - schema.setReadOnly(schemaObject.getReadOnly()); - if( schemaObject.getWriteOnly() != null ) - 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(schemaObject.getUniqueItems()); - if( schemaObject.hasXmlObject() ) - schema.setXml(XmlObject.composeXml(schemaObject.getXmlObject())); - if( schemaObject.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : schemaObject.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - schema.setExtensions(extensionMap); - } - - return schema; - } - /** - * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:638 - */ - public static SchemaObject parseSchema (org.openapi4j.parser.model.v3.Schema schema) { - SchemaObject schemaObject = new SchemaObject(); - - if( schema.isRef() ) - schemaObject.setRef(schema.getRef()); - if( schema.getAdditionalProperties() != null ) - schemaObject.setAdditionalProperties(parseSchema(schema.getAdditionalProperties())); - if( schema.getAdditionalProperties() == null && schema.getAdditionalPropertiesAllowed() != null ) - schemaObject.setAdditionalPropertiesAllowed(schema.getAdditionalPropertiesAllowed()); - if( schema.getDefault() != null ) - schemaObject.setDefaultValue(schema.getDefault()); - if( schema.getDescription() != null ) - schemaObject.setDescription(schema.getDescription()); - if( schema.getDeprecated() != null ) - schemaObject.setDeprecatedBoolean(schema.getDeprecated()); - if( schema.getDiscriminator() != null ) - schemaObject.setDiscriminatorObject(DiscriminatorObject.parseDiscriminator(schema.getDiscriminator())); - if( schema.getEnums() != null ){ - for( Object o : schema.getEnums() ){ - EnumObj enumObj = new EnumObj(); - enumObj.setEnumOb(o); - schemaObject.addEnumObj(enumObj); - } - } - if( schema.getExample() != null ) - schemaObject.setExample(schema.getExample()); - if( schema.getExclusiveMaximum() != null ) - schemaObject.setExclusiveMaximum(schema.getExclusiveMaximum()); - if( schema.getExclusiveMinimum() != null ) - schemaObject.setExclusiveMinimum(schema.getExclusiveMinimum()); - if( schema.getExternalDocs() != null ) - schemaObject.setExternalDocObject(ExternalDocObject.parseExternalDocs(schema.getExternalDocs())); - if( schema.getFormat() != null ) - schemaObject.setFormat(schema.getFormat()); - if( schema.getItemsSchema() != null ){ - ItemsSchema itemsSchema = new ItemsSchema(); - itemsSchema.setSchemaObject(parseSchema(schema.getItemsSchema())); - schemaObject.setItemsSchema(itemsSchema); - } - if( schema.getMaximum() != null ) - schemaObject.setMaximum(schema.getMaximum()); - if( schema.getMinimum() != null ) - schemaObject.setMinimum(schema.getMinimum()); - if( schema.getMaxItems() != null ) - schemaObject.setMaxItems(schema.getMaxItems()); - if( schema.getMinItems() != null ) - schemaObject.setMinItems(schema.getMinItems()); - if( schema.getMaxLength() != null ) - schemaObject.setMaxLength(schema.getMaxLength()); - if( schema.getMinLength() != null ) - schemaObject.setMinLength(schema.getMinLength()); - if( schema.getMaxProperties() != null ) - schemaObject.setMaxProperties(schema.getMaxProperties()); - if( schema.getMinProperties() != null ) - schemaObject.setMinProperties(schema.getMinProperties()); - if( schema.getMultipleOf() != null ) - schemaObject.setMultipleOf(schema.getMultipleOf()); - if( schema.getNotSchema() != null ){ - NotSchema notSchema = new NotSchema(); - notSchema.setSchemaObject(parseSchema(schema.getNotSchema())); - schemaObject.setNotSchema(notSchema); - } - if( schema.getNullable() != null ) - schemaObject.setNullable(schema.getNullable()); - if( schema.getPattern() != null ) - schemaObject.setPattern(schema.getPattern()); - if( schema.getProperties() != null ){ - for( String key : schema.getProperties().keySet() ){ - PropertyItem propertyItem = new PropertyItem(); - schemaObject.addPropertyItem(new PropertyItem(key, parseSchema(schema.getProperty(key)))); - } - } - if( schema.getRequiredFields() != null ){ - for( String s : schema.getRequiredFields() ){ - RequiredField requiredField = new RequiredField(); - requiredField.setValue(s); - schemaObject.addRequiredField(requiredField); - } - } - if( schema.getAllOfSchemas() != null ){ - 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 ){ - 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 ){ - for(org.openapi4j.parser.model.v3.Schema schemaItem : schema.getOneOfSchemas()){ - OneOfSchema oneOfSchema = new OneOfSchema(); - oneOfSchema.setSchemaObject(parseSchema(schemaItem)); - schemaObject.addOneOfSchema(oneOfSchema); - } - } - if( schema.getReadOnly() != null ) - schemaObject.setReadOnly(schema.getReadOnly()); - if( schema.getWriteOnly() != null ) - schemaObject.setWriteOnly(schema.getWriteOnly()); - if( schema.getType() != null ) - schemaObject.setType(schema.getType()); - if( schema.getTitle() != null ) - schemaObject.setTitle(schema.getTitle()); - if( schema.getUniqueItems() != null ) - schemaObject.setUniqueItems(schema.getUniqueItems()); - if( schema.getXml() != null ) - schemaObject.setXmlObject(XmlObject.parseXml(schema.getXml())); - if( schema.getExtensions() != null ){ - for( String key : schema.getExtensions().keySet() ) - schemaObject.addExtension(new Extension(key, schema.getExtensions().get(key))); - } - - return schemaObject; - } +public class SchemaObject extends SchemaOb implements Cloneable { /** * @declaredat ASTNode:1 */ @@ -282,11 +55,11 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:25 */ @ASTNodeAnnotation.Constructor( - 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", "Extension"}, - 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", "JastAddList<Extension>"}, - 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", "List"} + 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", "Extension"}, + type = {"SchemaOb", "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>", "JastAddList<Extension>"}, + 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", "List"} ) - 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, JastAddList<Extension> p37) { + public SchemaObject(SchemaOb 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, JastAddList<Extension> p36) { setAdditionalProperties(p0); setAdditionalPropertiesAllowed(p1); setDefaultValue(p2); @@ -323,43 +96,42 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { setTitle(p33); setUniqueItems(p34); setChild(p35, 10); - setRef(p36); - setChild(p37, 11); + setChild(p36, 11); } /** @apilevel low-level - * @declaredat ASTNode:71 + * @declaredat ASTNode:70 */ protected int numChildren() { return 12; } /** * @apilevel internal - * @declaredat ASTNode:77 + * @declaredat ASTNode:76 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:81 + * @declaredat ASTNode:80 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:85 + * @declaredat ASTNode:84 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:89 + * @declaredat ASTNode:88 */ public SchemaObject clone() throws CloneNotSupportedException { SchemaObject node = (SchemaObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:94 + * @declaredat ASTNode:93 */ public SchemaObject copy() { try { @@ -379,7 +151,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:113 + * @declaredat ASTNode:112 */ @Deprecated public SchemaObject fullCopy() { @@ -390,7 +162,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:123 + * @declaredat ASTNode:122 */ public SchemaObject treeCopyNoTransform() { SchemaObject tree = (SchemaObject) copy(); @@ -411,7 +183,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:143 + * @declaredat ASTNode:142 */ public SchemaObject treeCopy() { SchemaObject tree = (SchemaObject) copy(); @@ -427,30 +199,30 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:157 + * @declaredat ASTNode:156 */ protected boolean is$Equal(ASTNode node) { - 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); + return super.is$Equal(node) && (tokenSchemaOb_AdditionalProperties == ((SchemaObject) node).tokenSchemaOb_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); } /** * Replaces the lexeme AdditionalProperties. * @param value The new value for the lexeme AdditionalProperties. * @apilevel high-level */ - public void setAdditionalProperties(SchemaObject value) { - tokenSchemaObject_AdditionalProperties = value; + public void setAdditionalProperties(SchemaOb value) { + tokenSchemaOb_AdditionalProperties = value; } /** @apilevel internal */ - protected SchemaObject tokenSchemaObject_AdditionalProperties; + protected SchemaOb tokenSchemaOb_AdditionalProperties; /** * Retrieves the value for the lexeme AdditionalProperties. * @return The value for the lexeme AdditionalProperties. * @apilevel high-level */ @ASTNodeAnnotation.Token(name="AdditionalProperties") - public SchemaObject getAdditionalProperties() { - return tokenSchemaObject_AdditionalProperties; + public SchemaOb getAdditionalProperties() { + return tokenSchemaOb_AdditionalProperties; } /** * Replaces the lexeme AdditionalPropertiesAllowed. @@ -1847,26 +1619,6 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { public Opt<XmlObject> getXmlObjectOptNoTransform() { return (Opt<XmlObject>) getChildNoTransform(10); } - /** - * 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 : ""; - } /** * Replaces the Extension list. * @param list The new list node to be used as the Extension list. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaReference.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaReference.java new file mode 100644 index 0000000000000000000000000000000000000000..18cf586d48acfeee75f28504802151d0ed43a92d --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaReference.java @@ -0,0 +1,207 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:108 + * @astdecl SchemaReference : SchemaOb ::= <Ref:String> <SchemaObject:SchemaObject>; + * @production SchemaReference : {@link SchemaOb} ::= <span class="component"><Ref:String></span> <span class="component"><SchemaObject:SchemaObject></span>; + + */ +public class SchemaReference extends SchemaOb implements Cloneable { + /** + * @declaredat ASTNode:1 + */ + public SchemaReference() { + 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 = {"Ref", "SchemaObject"}, + type = {"String", "SchemaObject"}, + kind = {"Token", "Token"} + ) + public SchemaReference(String p0, SchemaObject p1) { + setRef(p0); + setSchemaObject(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 SchemaReference clone() throws CloneNotSupportedException { + SchemaReference node = (SchemaReference) super.clone(); + return node; + } + /** @apilevel internal + * @declaredat ASTNode:45 + */ + public SchemaReference copy() { + try { + SchemaReference node = (SchemaReference) 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 SchemaReference 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 SchemaReference treeCopyNoTransform() { + SchemaReference tree = (SchemaReference) 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 SchemaReference treeCopy() { + SchemaReference tree = (SchemaReference) 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_Ref == ((SchemaReference) node).tokenString_Ref) && (tokenSchemaObject_SchemaObject == ((SchemaReference) node).tokenSchemaObject_SchemaObject); + } + /** + * 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 : ""; + } + /** + * Replaces the lexeme SchemaObject. + * @param value The new value for the lexeme SchemaObject. + * @apilevel high-level + */ + public void setSchemaObject(SchemaObject value) { + tokenSchemaObject_SchemaObject = value; + } + /** @apilevel internal + */ + protected SchemaObject tokenSchemaObject_SchemaObject; + /** + * Retrieves the value for the lexeme SchemaObject. + * @return The value for the lexeme SchemaObject. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="SchemaObject") + public SchemaObject getSchemaObject() { + return tokenSchemaObject_SchemaObject; + } + /** @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/SchemaTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaTuple.java index bd5d206aa12089c496b27ca4d44566f98c0e24d6..703a0442272991c38afb13ed4a04c2c931a2b890 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaTuple.java @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:23 + * @astdecl SchemaTuple : ASTNode ::= <Key:String> SchemaOb; + * @production SchemaTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link SchemaOb}</span>; */ public class SchemaTuple extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class SchemaTuple extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Key", "SchemaObject"}, - type = {"String", "SchemaObject"}, + name = {"Key", "SchemaOb"}, + type = {"String", "SchemaOb"}, kind = {"Token", "Child"} ) - public SchemaTuple(String p0, SchemaObject p1) { + public SchemaTuple(String p0, SchemaOb p1) { setKey(p0); setChild(p1, 0); } @@ -178,30 +178,30 @@ public class SchemaTuple extends ASTNode<ASTNode> implements Cloneable { return tokenString_Key != null ? tokenString_Key : ""; } /** - * Replaces the SchemaObject child. - * @param node The new node to replace the SchemaObject child. + * Replaces the SchemaOb child. + * @param node The new node to replace the SchemaOb child. * @apilevel high-level */ - public void setSchemaObject(SchemaObject node) { + public void setSchemaOb(SchemaOb node) { setChild(node, 0); } /** - * Retrieves the SchemaObject child. - * @return The current node used as the SchemaObject child. + * Retrieves the SchemaOb child. + * @return The current node used as the SchemaOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="SchemaObject") - public SchemaObject getSchemaObject() { - return (SchemaObject) getChild(0); + @ASTNodeAnnotation.Child(name="SchemaOb") + public SchemaOb getSchemaOb() { + return (SchemaOb) getChild(0); } /** - * Retrieves the SchemaObject child. + * Retrieves the SchemaOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SchemaObject child. + * @return The current node used as the SchemaOb child. * @apilevel low-level */ - public SchemaObject getSchemaObjectNoTransform() { - return (SchemaObject) getChildNoTransform(0); + public SchemaOb getSchemaObNoTransform() { + return (SchemaOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 2fa6526b07fafa7e20bd43358ae243a55ddd6b72..74b93e538faec5f14dd22bae64a284b6a6fcb0a8 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:123 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:141 * @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 68ae3e26e4fa3a3584856790450d4729c1b65800..1fba3a51b55ad4265d53f080fd1c9ef1cf14889b 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:126 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:144 * @astdecl SecurityRequirementObject : ASTNode ::= SecurityRequirementTuple*; * @production SecurityRequirementObject : {@link ASTNode} ::= <span class="component">{@link SecurityRequirementTuple}*</span>; @@ -25,7 +25,7 @@ import java.util.stream.IntStream; public class SecurityRequirementObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:847 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:846 */ public static SecurityRequirement composeSecurityRequirement (SecurityRequirementObject securityRequirementObject){ SecurityRequirement securityRequirement = new SecurityRequirement(); @@ -45,7 +45,7 @@ public class SecurityRequirementObject extends ASTNode<ASTNode> implements Clone } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:862 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:861 */ 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 e784e36f47e9b555aebe2d7e0bec67263b447169..af367f20a1560f88b591aac06a3105a605c92179 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:127 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:145 * @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 42701881f9d220dfd3379189c99ffe65912a6164..a5305ccea859fc817b5f895d122ab534e9eaa63e 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:128 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:146 * @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/SecuritySchemeOb.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeOb.java new file mode 100644 index 0000000000000000000000000000000000000000..8fae5fa9052aaa429a3b76b600174c2e1d465659 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeOb.java @@ -0,0 +1,170 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:128 + * @astdecl SecuritySchemeOb : ASTNode; + * @production SecuritySchemeOb : {@link ASTNode}; + + */ +public abstract class SecuritySchemeOb extends ASTNode<ASTNode> implements Cloneable { + /** + * @aspect Composer + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:779 + */ + public static SecurityScheme composeSecurityScheme (SecuritySchemeObject securitySchemeObject){ + SecurityScheme securityScheme = new SecurityScheme(); + + if( !securitySchemeObject.getType().isEmpty() ) + securityScheme.setType(securitySchemeObject.getType()); + if( !securitySchemeObject.getName().isEmpty() ) + securityScheme.setName(securitySchemeObject.getName()); + if( !securitySchemeObject.getIn().isEmpty() ) + securityScheme.setIn(securitySchemeObject.getIn()); + if( !securitySchemeObject.getScheme().isEmpty() ) + securityScheme.setScheme(securitySchemeObject.getScheme()); + if( !securitySchemeObject.getOpenIdConnectUrl().isEmpty() ) + securityScheme.setOpenIdConnectUrl(securitySchemeObject.getOpenIdConnectUrl()); + if( securitySchemeObject.getOAuthFlowsObject() != null ) + securityScheme.setFlows(OAuthFlowsObject.composeOAuthFlows(securitySchemeObject.getOAuthFlowsObject())); + if( !securitySchemeObject.getDescription().isEmpty() ) + securityScheme.setDescription( securitySchemeObject.getDescription() ); + if( !securitySchemeObject.getBearerFormat().isEmpty() ) + securityScheme.setBearerFormat( securitySchemeObject.getBearerFormat() ); + if( securitySchemeObject.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : securitySchemeObject.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + securityScheme.setExtensions(extensionMap); + } + + return securityScheme; + } + /** + * @aspect Parser + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:791 + */ + public static SecuritySchemeObject parseSecurityScheme(SecurityScheme securityScheme){ + SecuritySchemeObject securitySchemeObject = new SecuritySchemeObject(); + + if( securityScheme.getType() != null ) + securitySchemeObject.setType(securityScheme.getType()); + if( securityScheme.getName() != null ) + securitySchemeObject.setName(securityScheme.getName()); + if( securityScheme.getIn() != null ) + securitySchemeObject.setIn(securityScheme.getIn()); + if( securityScheme.getScheme() != null ) + securitySchemeObject.setScheme(securityScheme.getScheme()); + if( securityScheme.getOpenIdConnectUrl() != null ) + securitySchemeObject.setOpenIdConnectUrl(securityScheme.getOpenIdConnectUrl()); + if( securityScheme.getFlows() != null ) + securitySchemeObject.setOAuthFlowsObject( OAuthFlowsObject.parseOAuthFlows(securityScheme.getFlows()) ); + if( securityScheme.getDescription() != null ) + securitySchemeObject.setDescription( securityScheme.getDescription() ); + if( securityScheme.getBearerFormat() != null ) + securitySchemeObject.setBearerFormat( securityScheme.getBearerFormat() ); + if( securityScheme.getExtensions() != null ){ + for( String key : securityScheme.getExtensions().keySet() ) + securitySchemeObject.addExtension(new Extension(key, securityScheme.getExtensions().get(key))); + } + + return securitySchemeObject; + } + /** + * @declaredat ASTNode:1 + */ + public SecuritySchemeOb() { + 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 SecuritySchemeOb clone() throws CloneNotSupportedException { + SecuritySchemeOb node = (SecuritySchemeOb) 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 SecuritySchemeOb 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 SecuritySchemeOb 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 SecuritySchemeOb 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/SecuritySchemeObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.java index 82aaed9b6a0bcf9931482de4bf34b4c4f09a755f..99f98e45a1ba3d5f1f6c7c9603074a0bf14425aa 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 @@ -17,74 +17,12 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:112 - * @astdecl SecuritySchemeObject : ASTNode ::= <Type:String> <Description:String> <Name:String> <In:String> <Scheme:String> <BearerFormat:String> OAuthFlowsObject <OpenIdConnectUrl:String> <Ref:String> Extension*; - * @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> <span class="component">{@link Extension}*</span>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:130 + * @astdecl SecuritySchemeObject : ASTNode ::= <Type:String> <Description:String> <Name:String> <In:String> <Scheme:String> <BearerFormat:String> OAuthFlowsObject <OpenIdConnectUrl:String> Extension*; + * @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">{@link Extension}*</span>; */ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable { - /** - * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:780 - */ - public static SecurityScheme composeSecurityScheme (SecuritySchemeObject securitySchemeObject){ - SecurityScheme securityScheme = new SecurityScheme(); - - if( !securitySchemeObject.getType().isEmpty() ) - securityScheme.setType(securitySchemeObject.getType()); - if( !securitySchemeObject.getName().isEmpty() ) - securityScheme.setName(securitySchemeObject.getName()); - if( !securitySchemeObject.getIn().isEmpty() ) - securityScheme.setIn(securitySchemeObject.getIn()); - if( !securitySchemeObject.getScheme().isEmpty() ) - securityScheme.setScheme(securitySchemeObject.getScheme()); - if( !securitySchemeObject.getOpenIdConnectUrl().isEmpty() ) - securityScheme.setOpenIdConnectUrl(securitySchemeObject.getOpenIdConnectUrl()); - if( securitySchemeObject.getOAuthFlowsObject() != null ) - securityScheme.setFlows(OAuthFlowsObject.composeOAuthFlows(securitySchemeObject.getOAuthFlowsObject())); - if( !securitySchemeObject.getDescription().isEmpty() ) - securityScheme.setDescription( securitySchemeObject.getDescription() ); - if( !securitySchemeObject.getBearerFormat().isEmpty() ) - securityScheme.setBearerFormat( securitySchemeObject.getBearerFormat() ); - if( securitySchemeObject.getNumExtension() != 0 ){ - Map<String, Object> extensionMap = new HashMap<>(); - for( Extension e : securitySchemeObject.getExtensions() ) - extensionMap.put(e.getKey(), e.getValue()); - securityScheme.setExtensions(extensionMap); - } - - return securityScheme; - } - /** - * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:792 - */ - public static SecuritySchemeObject parseSecurityScheme(SecurityScheme securityScheme){ - SecuritySchemeObject securitySchemeObject = new SecuritySchemeObject(); - - if( securityScheme.getType() != null ) - securitySchemeObject.setType(securityScheme.getType()); - if( securityScheme.getName() != null ) - securitySchemeObject.setName(securityScheme.getName()); - if( securityScheme.getIn() != null ) - securitySchemeObject.setIn(securityScheme.getIn()); - if( securityScheme.getScheme() != null ) - securitySchemeObject.setScheme(securityScheme.getScheme()); - if( securityScheme.getOpenIdConnectUrl() != null ) - securitySchemeObject.setOpenIdConnectUrl(securityScheme.getOpenIdConnectUrl()); - if( securityScheme.getFlows() != null ) - securitySchemeObject.setOAuthFlowsObject( OAuthFlowsObject.parseOAuthFlows(securityScheme.getFlows()) ); - if( securityScheme.getDescription() != null ) - securitySchemeObject.setDescription( securityScheme.getDescription() ); - if( securityScheme.getBearerFormat() != null ) - securitySchemeObject.setBearerFormat( securityScheme.getBearerFormat() ); - if( securityScheme.getExtensions() != null ){ - for( String key : securityScheme.getExtensions().keySet() ) - securitySchemeObject.addExtension(new Extension(key, securityScheme.getExtensions().get(key))); - } - - return securitySchemeObject; - } /** * @declaredat ASTNode:1 */ @@ -106,11 +44,11 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable * @declaredat ASTNode:14 */ @ASTNodeAnnotation.Constructor( - name = {"Type", "Description", "Name", "In", "Scheme", "BearerFormat", "OAuthFlowsObject", "OpenIdConnectUrl", "Ref", "Extension"}, - type = {"String", "String", "String", "String", "String", "String", "OAuthFlowsObject", "String", "String", "JastAddList<Extension>"}, - kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Child", "Token", "Token", "List"} + name = {"Type", "Description", "Name", "In", "Scheme", "BearerFormat", "OAuthFlowsObject", "OpenIdConnectUrl", "Extension"}, + type = {"String", "String", "String", "String", "String", "String", "OAuthFlowsObject", "String", "JastAddList<Extension>"}, + kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Child", "Token", "List"} ) - public SecuritySchemeObject(String p0, String p1, String p2, String p3, String p4, String p5, OAuthFlowsObject p6, String p7, String p8, JastAddList<Extension> p9) { + public SecuritySchemeObject(String p0, String p1, String p2, String p3, String p4, String p5, OAuthFlowsObject p6, String p7, JastAddList<Extension> p8) { setType(p0); setDescription(p1); setName(p2); @@ -119,43 +57,42 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable setBearerFormat(p5); setChild(p6, 0); setOpenIdConnectUrl(p7); - setRef(p8); - setChild(p9, 1); + setChild(p8, 1); } /** @apilevel low-level - * @declaredat ASTNode:32 + * @declaredat ASTNode:31 */ protected int numChildren() { return 2; } /** * @apilevel internal - * @declaredat ASTNode:38 + * @declaredat ASTNode:37 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:42 + * @declaredat ASTNode:41 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:46 + * @declaredat ASTNode:45 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:50 + * @declaredat ASTNode:49 */ public SecuritySchemeObject clone() throws CloneNotSupportedException { SecuritySchemeObject node = (SecuritySchemeObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:55 + * @declaredat ASTNode:54 */ public SecuritySchemeObject copy() { try { @@ -175,7 +112,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:74 + * @declaredat ASTNode:73 */ @Deprecated public SecuritySchemeObject fullCopy() { @@ -186,7 +123,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:84 + * @declaredat ASTNode:83 */ public SecuritySchemeObject treeCopyNoTransform() { SecuritySchemeObject tree = (SecuritySchemeObject) copy(); @@ -207,7 +144,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:104 + * @declaredat ASTNode:103 */ public SecuritySchemeObject treeCopy() { SecuritySchemeObject tree = (SecuritySchemeObject) copy(); @@ -223,10 +160,10 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable return tree; } /** @apilevel internal - * @declaredat ASTNode:118 + * @declaredat ASTNode:117 */ 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) && (tokenString_Ref == ((SecuritySchemeObject) node).tokenString_Ref); + 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); } /** * Replaces the lexeme Type. @@ -394,26 +331,6 @@ 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 : ""; - } /** * Replaces the Extension list. * @param list The new list node to be used as the Extension list. diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeReference.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeReference.java new file mode 100644 index 0000000000000000000000000000000000000000..1c958531a7f72cde0541920b2335d5a3bd284814 --- /dev/null +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeReference.java @@ -0,0 +1,207 @@ +/* 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; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import javax.net.ssl.HttpsURLConnection; +import java.util.Random; +import java.util.stream.IntStream; +/** + * @ast node + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:129 + * @astdecl SecuritySchemeReference : SecuritySchemeOb ::= <Ref:String> <SecuritySchemeObject:SecuritySchemeObject>; + * @production SecuritySchemeReference : {@link SecuritySchemeOb} ::= <span class="component"><Ref:String></span> <span class="component"><SecuritySchemeObject:SecuritySchemeObject></span>; + + */ +public class SecuritySchemeReference extends SecuritySchemeOb implements Cloneable { + /** + * @declaredat ASTNode:1 + */ + public SecuritySchemeReference() { + 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 = {"Ref", "SecuritySchemeObject"}, + type = {"String", "SecuritySchemeObject"}, + kind = {"Token", "Token"} + ) + public SecuritySchemeReference(String p0, SecuritySchemeObject p1) { + setRef(p0); + setSecuritySchemeObject(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 SecuritySchemeReference clone() throws CloneNotSupportedException { + SecuritySchemeReference node = (SecuritySchemeReference) super.clone(); + return node; + } + /** @apilevel internal + * @declaredat ASTNode:45 + */ + public SecuritySchemeReference copy() { + try { + SecuritySchemeReference node = (SecuritySchemeReference) 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 SecuritySchemeReference 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 SecuritySchemeReference treeCopyNoTransform() { + SecuritySchemeReference tree = (SecuritySchemeReference) 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 SecuritySchemeReference treeCopy() { + SecuritySchemeReference tree = (SecuritySchemeReference) 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_Ref == ((SecuritySchemeReference) node).tokenString_Ref) && (tokenSecuritySchemeObject_SecuritySchemeObject == ((SecuritySchemeReference) node).tokenSecuritySchemeObject_SecuritySchemeObject); + } + /** + * 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 : ""; + } + /** + * Replaces the lexeme SecuritySchemeObject. + * @param value The new value for the lexeme SecuritySchemeObject. + * @apilevel high-level + */ + public void setSecuritySchemeObject(SecuritySchemeObject value) { + tokenSecuritySchemeObject_SecuritySchemeObject = value; + } + /** @apilevel internal + */ + protected SecuritySchemeObject tokenSecuritySchemeObject_SecuritySchemeObject; + /** + * Retrieves the value for the lexeme SecuritySchemeObject. + * @return The value for the lexeme SecuritySchemeObject. + * @apilevel high-level + */ + @ASTNodeAnnotation.Token(name="SecuritySchemeObject") + public SecuritySchemeObject getSecuritySchemeObject() { + return tokenSecuritySchemeObject_SecuritySchemeObject; + } + /** @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/SecuritySchemeTuple.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeTuple.java index 5c170e03ff905f6743cd57817ecd7f1f223991fb..de0a56412c2aad2e4577f9ea15fe93622bda925d 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeTuple.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeTuple.java @@ -17,9 +17,9 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:29 + * @astdecl SecuritySchemeTuple : ASTNode ::= <Key:String> SecuritySchemeOb; + * @production SecuritySchemeTuple : {@link ASTNode} ::= <span class="component"><Key:String></span> <span class="component">{@link SecuritySchemeOb}</span>; */ public class SecuritySchemeTuple extends ASTNode<ASTNode> implements Cloneable { @@ -43,11 +43,11 @@ public class SecuritySchemeTuple extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:13 */ @ASTNodeAnnotation.Constructor( - name = {"Key", "SecuritySchemeObject"}, - type = {"String", "SecuritySchemeObject"}, + name = {"Key", "SecuritySchemeOb"}, + type = {"String", "SecuritySchemeOb"}, kind = {"Token", "Child"} ) - public SecuritySchemeTuple(String p0, SecuritySchemeObject p1) { + public SecuritySchemeTuple(String p0, SecuritySchemeOb p1) { setKey(p0); setChild(p1, 0); } @@ -178,30 +178,30 @@ public class SecuritySchemeTuple extends ASTNode<ASTNode> implements Cloneable { return tokenString_Key != null ? tokenString_Key : ""; } /** - * Replaces the SecuritySchemeObject child. - * @param node The new node to replace the SecuritySchemeObject child. + * Replaces the SecuritySchemeOb child. + * @param node The new node to replace the SecuritySchemeOb child. * @apilevel high-level */ - public void setSecuritySchemeObject(SecuritySchemeObject node) { + public void setSecuritySchemeOb(SecuritySchemeOb node) { setChild(node, 0); } /** - * Retrieves the SecuritySchemeObject child. - * @return The current node used as the SecuritySchemeObject child. + * Retrieves the SecuritySchemeOb child. + * @return The current node used as the SecuritySchemeOb child. * @apilevel high-level */ - @ASTNodeAnnotation.Child(name="SecuritySchemeObject") - public SecuritySchemeObject getSecuritySchemeObject() { - return (SecuritySchemeObject) getChild(0); + @ASTNodeAnnotation.Child(name="SecuritySchemeOb") + public SecuritySchemeOb getSecuritySchemeOb() { + return (SecuritySchemeOb) getChild(0); } /** - * Retrieves the SecuritySchemeObject child. + * Retrieves the SecuritySchemeOb child. * <p><em>This method does not invoke AST transformations.</em></p> - * @return The current node used as the SecuritySchemeObject child. + * @return The current node used as the SecuritySchemeOb child. * @apilevel low-level */ - public SecuritySchemeObject getSecuritySchemeObjectNoTransform() { - return (SecuritySchemeObject) getChildNoTransform(0); + public SecuritySchemeOb getSecuritySchemeObNoTransform() { + return (SecuritySchemeOb) getChildNoTransform(0); } /** @apilevel internal */ public ASTNode rewriteTo() { 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 7c839a38a6265244ad43c96d5ed9a940f74d5b31..deb0e6674a841b43533e96a7e30be9f376899c90 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 @@ -17,15 +17,15 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:14 + * @astdecl ServerObject : ASTNode ::= <Url:String> <Description:String> ServerVariablesTuple* Extension*; + * @production ServerObject : {@link ASTNode} ::= <span class="component"><Url:String></span> <span class="component"><Description:String></span> <span class="component">{@link ServerVariablesTuple}*</span> <span class="component">{@link Extension}*</span>; */ public class ServerObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:115 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:115 */ public static Server composeServer (ServerObject serverObject){ Server server = new Server(); @@ -45,7 +45,7 @@ public class ServerObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:91 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:91 */ public static ServerObject parseServer(Server server){ ServerObject serverObject = new ServerObject(); @@ -75,56 +75,58 @@ public class ServerObject 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 = {"Url", "Description", "ServerVariablesTuple"}, - type = {"String", "String", "JastAddList<ServerVariablesTuple>"}, - kind = {"Token", "Token", "List"} + name = {"Url", "Description", "ServerVariablesTuple", "Extension"}, + type = {"String", "String", "JastAddList<ServerVariablesTuple>", "JastAddList<Extension>"}, + kind = {"Token", "Token", "List", "List"} ) - public ServerObject(String p0, String p1, JastAddList<ServerVariablesTuple> p2) { + public ServerObject(String p0, String p1, JastAddList<ServerVariablesTuple> p2, JastAddList<Extension> p3) { setUrl(p0); setDescription(p1); setChild(p2, 0); + setChild(p3, 1); } /** @apilevel low-level - * @declaredat ASTNode:25 + * @declaredat ASTNode:27 */ protected int numChildren() { - return 1; + return 2; } /** * @apilevel internal - * @declaredat ASTNode:31 + * @declaredat ASTNode:33 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:35 + * @declaredat ASTNode:37 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:39 + * @declaredat ASTNode:41 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:43 + * @declaredat ASTNode:45 */ public ServerObject clone() throws CloneNotSupportedException { ServerObject node = (ServerObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:48 + * @declaredat ASTNode:50 */ public ServerObject copy() { try { @@ -144,7 +146,7 @@ public class ServerObject 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:67 + * @declaredat ASTNode:69 */ @Deprecated public ServerObject fullCopy() { @@ -155,7 +157,7 @@ public class ServerObject 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:77 + * @declaredat ASTNode:79 */ public ServerObject treeCopyNoTransform() { ServerObject tree = (ServerObject) copy(); @@ -176,7 +178,7 @@ public class ServerObject 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:97 + * @declaredat ASTNode:99 */ public ServerObject treeCopy() { ServerObject tree = (ServerObject) copy(); @@ -192,7 +194,7 @@ public class ServerObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:111 + * @declaredat ASTNode:113 */ protected boolean is$Equal(ASTNode node) { return super.is$Equal(node) && (tokenString_Url == ((ServerObject) node).tokenString_Url) && (tokenString_Description == ((ServerObject) node).tokenString_Description); @@ -347,6 +349,116 @@ public class ServerObject extends ASTNode<ASTNode> implements Cloneable { public JastAddList<ServerVariablesTuple> getServerVariablesTuplesNoTransform() { return getServerVariablesTupleListNoTransform(); } + /** + * 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() { return super.rewriteTo(); 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 ac4fc1dcdc7cbcd9e98e627d2cae54be4250d881..6b6e16598f0447e0fa23849a14b07a722a99d72a 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 @@ -17,15 +17,15 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:18 + * @astdecl ServerVariableObject : ASTNode ::= Enum* <Default:String> <Description:String> Extension*; + * @production ServerVariableObject : {@link ASTNode} ::= <span class="component">{@link Enum}*</span> <span class="component"><Default:String></span> <span class="component"><Description:String></span> <span class="component">{@link Extension}*</span>; */ public class ServerVariableObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:132 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:132 */ public static ServerVariable composeServerVariable (ServerVariableObject serverVariableObject){ ServerVariable serverVariable = new ServerVariable(); @@ -45,7 +45,7 @@ public class ServerVariableObject extends ASTNode<ASTNode> implements Cloneable } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:106 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:106 */ public static ServerVariableObject parseServerVariable(ServerVariable serverVariable){ ServerVariableObject serverVariableObject = new ServerVariableObject(); @@ -75,56 +75,58 @@ public class ServerVariableObject 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 = {"Enum", "Default", "Description"}, - type = {"JastAddList<Enum>", "String", "String"}, - kind = {"List", "Token", "Token"} + name = {"Enum", "Default", "Description", "Extension"}, + type = {"JastAddList<Enum>", "String", "String", "JastAddList<Extension>"}, + kind = {"List", "Token", "Token", "List"} ) - public ServerVariableObject(JastAddList<Enum> p0, String p1, String p2) { + public ServerVariableObject(JastAddList<Enum> p0, String p1, String p2, JastAddList<Extension> p3) { setChild(p0, 0); setDefault(p1); setDescription(p2); + setChild(p3, 1); } /** @apilevel low-level - * @declaredat ASTNode:25 + * @declaredat ASTNode:27 */ protected int numChildren() { - return 1; + return 2; } /** * @apilevel internal - * @declaredat ASTNode:31 + * @declaredat ASTNode:33 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:35 + * @declaredat ASTNode:37 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:39 + * @declaredat ASTNode:41 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:43 + * @declaredat ASTNode:45 */ public ServerVariableObject clone() throws CloneNotSupportedException { ServerVariableObject node = (ServerVariableObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:48 + * @declaredat ASTNode:50 */ public ServerVariableObject copy() { try { @@ -144,7 +146,7 @@ public class ServerVariableObject 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:67 + * @declaredat ASTNode:69 */ @Deprecated public ServerVariableObject fullCopy() { @@ -155,7 +157,7 @@ public class ServerVariableObject 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:77 + * @declaredat ASTNode:79 */ public ServerVariableObject treeCopyNoTransform() { ServerVariableObject tree = (ServerVariableObject) copy(); @@ -176,7 +178,7 @@ public class ServerVariableObject 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:97 + * @declaredat ASTNode:99 */ public ServerVariableObject treeCopy() { ServerVariableObject tree = (ServerVariableObject) copy(); @@ -192,7 +194,7 @@ public class ServerVariableObject extends ASTNode<ASTNode> implements Cloneable return tree; } /** @apilevel internal - * @declaredat ASTNode:111 + * @declaredat ASTNode:113 */ protected boolean is$Equal(ASTNode node) { return super.is$Equal(node) && (tokenString_Default == ((ServerVariableObject) node).tokenString_Default) && (tokenString_Description == ((ServerVariableObject) node).tokenString_Description); @@ -347,6 +349,116 @@ public class ServerVariableObject extends ASTNode<ASTNode> implements Cloneable public String getDescription() { return tokenString_Description != null ? tokenString_Description : ""; } + /** + * 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() { return super.rewriteTo(); 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 0492f357a2588c6f1aaf147d8f89f1cdb1071b8b..b132f092e655fd50667db1507995a050e366b5a7 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:15 + * @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 5cfac6e7a644d0a9c39fbfccec133dd90f61617e..460d318022dcf16abcfcb9a5d7339b947d8f70c3 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:50 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:52 * @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 e865898e55eda84a4f98b4667dd120b2d5aca67a..d5fbeac3eb321ce86e6835a6653855a9d60fae81 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:90 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:104 * @astdecl TagObject : ASTNode ::= <Name:String> <Description:String> [ExternalDocObject] Extension*; * @production TagObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Description:String></span> <span class="component">[{@link ExternalDocObject}]</span> <span class="component">{@link Extension}*</span>; @@ -25,7 +25,7 @@ import java.util.stream.IntStream; public class TagObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:628 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:627 */ 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(); @@ -47,7 +47,7 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:621 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:620 */ public static TagObject parseTag(org.openapi4j.parser.model.v3.Tag tag){ TagObject tagObject = new TagObject(); 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 c65c0de0501ccefbe825b479b358cd1d7e4c1490..5b83d6e9af776ef03cdb8ba507a1ee9fc1c10b89 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 @@ -17,7 +17,7 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:46 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:48 * @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 2782da7218530cee1529c101e1dc2deacab8da4a..043dd35616f9fd827851cc6a74cbc8741611b20b 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 @@ -17,15 +17,15 @@ import java.util.Random; import java.util.stream.IntStream; /** * @ast node - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/OpenAPISpecification.ast:109 - * @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>; + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:125 + * @astdecl XmlObject : ASTNode ::= <Name:String> <Namespace:String> <Prefix:String> <Attribute:Boolean> <Wrapped:Boolean> Extension*; + * @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> <span class="component">{@link Extension}*</span>; */ public class XmlObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Composer.jadd:763 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:762 */ public static Xml composeXml (XmlObject xmlObject) { Xml xml = new Xml(); @@ -45,7 +45,7 @@ public class XmlObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat /Users/jueunpark/bachelor-thesis-jastadd/src/main/jastadd/Parser.jrag:775 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:774 */ public static XmlObject parseXml (Xml xml) { XmlObject xmlObject = new XmlObject(); @@ -77,56 +77,59 @@ public class XmlObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { + children = new ASTNode[1]; + setChild(new JastAddList(), 0); } /** - * @declaredat ASTNode:12 + * @declaredat ASTNode:14 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "Namespace", "Prefix", "Attribute", "Wrapped"}, - type = {"String", "String", "String", "Boolean", "Boolean"}, - kind = {"Token", "Token", "Token", "Token", "Token"} + name = {"Name", "Namespace", "Prefix", "Attribute", "Wrapped", "Extension"}, + type = {"String", "String", "String", "Boolean", "Boolean", "JastAddList<Extension>"}, + kind = {"Token", "Token", "Token", "Token", "Token", "List"} ) - public XmlObject(String p0, String p1, String p2, Boolean p3, Boolean p4) { + public XmlObject(String p0, String p1, String p2, Boolean p3, Boolean p4, JastAddList<Extension> p5) { setName(p0); setNamespace(p1); setPrefix(p2); setAttribute(p3); setWrapped(p4); + setChild(p5, 0); } /** @apilevel low-level - * @declaredat ASTNode:25 + * @declaredat ASTNode:28 */ protected int numChildren() { - return 0; + return 1; } /** * @apilevel internal - * @declaredat ASTNode:31 + * @declaredat ASTNode:34 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:35 + * @declaredat ASTNode:38 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:39 + * @declaredat ASTNode:42 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:43 + * @declaredat ASTNode:46 */ public XmlObject clone() throws CloneNotSupportedException { XmlObject node = (XmlObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:48 + * @declaredat ASTNode:51 */ public XmlObject copy() { try { @@ -146,7 +149,7 @@ public class XmlObject 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:67 + * @declaredat ASTNode:70 */ @Deprecated public XmlObject fullCopy() { @@ -157,7 +160,7 @@ public class XmlObject 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:77 + * @declaredat ASTNode:80 */ public XmlObject treeCopyNoTransform() { XmlObject tree = (XmlObject) copy(); @@ -178,7 +181,7 @@ public class XmlObject 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:97 + * @declaredat ASTNode:100 */ public XmlObject treeCopy() { XmlObject tree = (XmlObject) copy(); @@ -194,7 +197,7 @@ public class XmlObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:111 + * @declaredat ASTNode:114 */ 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) && (tokenBoolean_Attribute == ((XmlObject) node).tokenBoolean_Attribute) && (tokenBoolean_Wrapped == ((XmlObject) node).tokenBoolean_Wrapped); @@ -299,6 +302,116 @@ public class XmlObject extends ASTNode<ASTNode> implements Cloneable { public Boolean getWrapped() { return tokenBoolean_Wrapped; } + /** + * 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(); diff --git a/src/main/jastadd/Composer.jadd b/src/main/jastadd/Composer.jadd index 1aaafd6abd037a1c7b7f0961aed464c542c744bf..d6de68ac331a34561430350923e27f239173196b 100644 --- a/src/main/jastadd/Composer.jadd +++ b/src/main/jastadd/Composer.jadd @@ -269,10 +269,9 @@ public static Components ComponentsObject.composeComponents (ComponentsObject co return components; } -public static Path PathItem.composePath (PathItem pathItem){ +public static Path PathItemOb.composePath (PathItem pathItem){ Path path = new Path(); - if( !pathItem.getRef().isEmpty() ) path.setRef(pathItem.getRef()); if( !pathItem.getSummary().isEmpty()) @@ -388,7 +387,7 @@ public static ExternalDocs ExternalDocObject.composeExternalDocs (ExternalDocObj return externalDocs; } -public static Parameter ParameterObject.composeParameter (ParameterObject parameterObject){ +public static Parameter ParameterOb.composeParameter (ParameterObject parameterObject){ Parameter parameter = new Parameter(); if( !parameterObject.getRef().isEmpty() ) @@ -437,7 +436,7 @@ public static Parameter ParameterObject.composeParameter (ParameterObject parame return parameter; } -public static org.openapi4j.parser.model.v3.RequestBody RequestBodyObject.composeRequestBody (RequestBodyObject requestBodyObject){ +public static org.openapi4j.parser.model.v3.RequestBody RequestBodyOb.composeRequestBody (RequestBodyObject requestBodyObject){ org.openapi4j.parser.model.v3.RequestBody requestBody = new org.openapi4j.parser.model.v3.RequestBody(); if( requestBodyObject.getNumContentTuple() != 0 ){ @@ -504,7 +503,7 @@ public static EncodingProperty EncodingObject.composeEncodingProperty (EncodingO return encodingProperty; } -public static Response ResponseObject.composeResponse (ResponseObject responseObject){ +public static Response ResponseOb.composeResponse (ResponseObject responseObject){ Response response = new Response(); if( !responseObject.getRef().isEmpty() ) @@ -533,7 +532,7 @@ public static Response ResponseObject.composeResponse (ResponseObject responseOb return response; } -public static Callback CallbackObject.composeCallback (CallbackObject callbackObject){ +public static Callback CallbackOb.composeCallback (CallbackObject callbackObject){ Callback callback = new Callback(); if( callbackObject.getNumExpression() != 0 ){ @@ -546,7 +545,7 @@ public static Callback CallbackObject.composeCallback (CallbackObject callbackOb return callback; } -public static Example ExampleObject.composeExample (ExampleObject exampleObject){ +public static Example ExampleOb.composeExample (ExampleObject exampleObject){ Example example = new Example(); if( !exampleObject.getSummary().isEmpty() ) @@ -567,7 +566,7 @@ public static Example ExampleObject.composeExample (ExampleObject exampleObject) return example; } -public static Link LinkObject.composeLink (LinkObject linkObject){ +public static Link LinkOb.composeLink (LinkObject linkObject){ Link link = new Link(); if( !linkObject.getRef().isEmpty() ) @@ -590,7 +589,7 @@ public static Link LinkObject.composeLink (LinkObject linkObject){ return link; } -public static Header HeaderObject.composeHeader (HeaderObject headerObject){ +public static Header HeaderOb.composeHeader (HeaderObject headerObject){ Header header = new Header(); if( !headerObject.getRef().isEmpty() ) @@ -644,7 +643,7 @@ public static org.openapi4j.parser.model.v3.Tag TagObject.composeTag (TagObject return tag; } -public static org.openapi4j.parser.model.v3.Schema SchemaObject.composeSchema (SchemaObject schemaObject) { +public static org.openapi4j.parser.model.v3.Schema SchemaOb.composeSchema (SchemaObject schemaObject) { org.openapi4j.parser.model.v3.Schema schema = new org.openapi4j.parser.model.v3.Schema(); if( !schemaObject.getRef().isEmpty() ) @@ -777,7 +776,7 @@ public static Xml XmlObject.composeXml (XmlObject xmlObject) { return xml; } -public static SecurityScheme SecuritySchemeObject.composeSecurityScheme (SecuritySchemeObject securitySchemeObject){ +public static SecurityScheme SecuritySchemeOb.composeSecurityScheme (SecuritySchemeObject securitySchemeObject){ SecurityScheme securityScheme = new SecurityScheme(); if( !securitySchemeObject.getType().isEmpty() ) diff --git a/src/main/jastadd/OpenAPISpecification.ast b/src/main/jastadd/OpenAPISpecification.ast index 9e114f85dff832ca98bd3f60e601906c22642604..318b95fa64f7b5866c8ee4305b6bcb19d607fc73 100644 --- a/src/main/jastadd/OpenAPISpecification.ast +++ b/src/main/jastadd/OpenAPISpecification.ast @@ -8,14 +8,14 @@ InfoObject ::= <Title> <Description> <TermsOfService> [ContactObject] [LicenseOb ContactObject ::= <Name> <Url> <Email> Extension*; //License Object -LicenseObject ::= <Name> <Url>; +LicenseObject ::= <Name> <Url> Extension*; //Server Object -ServerObject ::= <Url> <Description> ServerVariablesTuple*; +ServerObject ::= <Url> <Description> ServerVariablesTuple* Extension*; ServerVariablesTuple ::= <Name> ServerVariableObject; //Server Variable Object -ServerVariableObject ::= Enum* <Default> <Description>; +ServerVariableObject ::= Enum* <Default> <Description> Extension*; Enum ::= <EnumValue>; //Components Object @@ -66,7 +66,7 @@ RequestBodyReference : RequestBodyOb ::= <Ref> <RequestBodyObject:RequestBodyObj RequestBodyObject : RequestBodyOb ::= <Description> ContentTuple* <Required:Boolean>; //Media Type Object -MediaTypeObject ::= [SchemaOb] <Example:Object> ExampleTuple* EncodingTuple*; +MediaTypeObject ::= [SchemaOb] <Example:Object> ExampleTuple* EncodingTuple* Extension*; EncodingTuple ::= <Key> EncodingObject; //Encoding Object @@ -75,10 +75,12 @@ EncodingObject ::= <ContentType> HeaderTuple* <Style> <Explode:Boolean> <AllowRe //Response Object abstract ResponseOb; ResponseReference : ResponseOb ::= <Ref> <ResponseObject:ResponseObject>; -ResponseObject : ResponseOb ::= <Description> HeaderTuple* ContentTuple* LinkTuple*; +ResponseObject : ResponseOb ::= <Description> HeaderTuple* ContentTuple* LinkTuple* Extension*; //Callback Object -CallbackObject ::= Expression* Extension* <Ref>; +abstract CallbackOb; +CallbackReference : CallbackOb ::= <Ref> <CallbackObject:CallbackObject>; +CallbackObject : CallbackOb ::= Expression* Extension*; Expression ::= <Name> PathItemOb; Extension ::= <Key> <Value:Object>; @@ -90,13 +92,13 @@ ExampleObject : ExampleOb ::= <Summary> <Description> <Value:Object> <ExternalVa //Link Object abstract LinkOb; LinkReference : LinkOb ::= <Ref> <LinkObject:LinkObject>; -LinkObject ::= <OperationRef> <OperationID> LinkParameterTuple* HeaderTuple* <Description> [ServerObject]; +LinkObject ::= <OperationRef> <OperationID> LinkParameterTuple* HeaderTuple* <Description> [ServerObject] Extension*; LinkParameterTuple ::= <LinkParameterKey> <LinkParameterValue>; //Header Object abstract HeaderOb; HeaderReference : HeaderOb ::= <Ref> <HeaderObject:HeaderObject>; -HeaderObject : HeaderOb ::= <Description> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style> <Explode:Boolean> <AllowReserved:Boolean> [SchemaOb] <Example:Object> ExampleTuple* ContentTuple* <Ref>; +HeaderObject : HeaderOb ::= <Description> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style> <Explode:Boolean> <AllowReserved:Boolean> [SchemaOb] <Example:Object> ExampleTuple* ContentTuple* Extension*; //Tag Object TagObject ::= <Name> <Description> [ExternalDocObject] Extension*; @@ -120,7 +122,7 @@ DiscriminatorObject ::= <PropertyName> MappingTuple*; MappingTuple ::= <Key> <Value>; //XML Object -XmlObject ::= <Name> <Namespace> <Prefix> <Attribute:Boolean> <Wrapped:Boolean>; +XmlObject ::= <Name> <Namespace> <Prefix> <Attribute:Boolean> <Wrapped:Boolean> Extension*; //Security Scheme Object abstract SecuritySchemeOb; @@ -128,14 +130,14 @@ SecuritySchemeReference : SecuritySchemeOb ::= <Ref> <SecuritySchemeObject:Secur SecuritySchemeObject ::= <Type> <Description> <Name> <In> <Scheme> <BearerFormat> OAuthFlowsObject <OpenIdConnectUrl> Extension*; //OAuth Flows Object -OAuthFlowsObject ::= [Implicit] [Password] [ClientCredentials] [AuthorizationCode]; +OAuthFlowsObject ::= [Implicit] [Password] [ClientCredentials] [AuthorizationCode] Extension*; Implicit ::= OAuthFlowObject; Password ::= OAuthFlowObject; ClientCredentials ::= OAuthFlowObject; AuthorizationCode ::= OAuthFlowObject; //OAuth Flow Object -OAuthFlowObject ::= <AuthorizationUrl> <TokenUrl> <RefreshUrl> ScopesTuple* <Configuration>; +OAuthFlowObject ::= <AuthorizationUrl> <TokenUrl> <RefreshUrl> ScopesTuple* <Configuration> Extension*; ScopesTuple ::= <ScopesKey> <ScopesValue>; //Security Requirement Object diff --git a/src/main/jastadd/Parser.jrag b/src/main/jastadd/Parser.jrag index 12be8ce6355a238300c2af3fe3d77a64c1c15e51..6209bd01c64c9c1fe559fdb03702367830c9815a 100644 --- a/src/main/jastadd/Parser.jrag +++ b/src/main/jastadd/Parser.jrag @@ -274,10 +274,9 @@ public static ComponentsObject ComponentsObject.parseComponents(Components compo return componentsObject; } -public static PathItem PathItem.parsePath(Path path){ +public static PathItem PathItemOb.parsePath(Path path){ PathItem pathItem = new PathItem(); - if( path.getRef() != null ) pathItem.setRef(path.getRef()); if( path.getSummary() != null ) @@ -413,7 +412,7 @@ public static ExternalDocObject ExternalDocObject.parseExternalDocs(ExternalDocs return externalDocObject; } -public static ParameterObject ParameterObject.parseParameter(Parameter parameter){ +public static ParameterObject ParameterOb.parseParameter(Parameter parameter){ ParameterObject parameterObject = new ParameterObject(); if( parameter.isRef() ) @@ -454,7 +453,7 @@ public static ParameterObject ParameterObject.parseParameter(Parameter parameter return parameterObject; } -public static RequestBodyObject RequestBodyObject.parseRequestBody(org.openapi4j.parser.model.v3.RequestBody requestBody){ +public static RequestBodyObject RequestBodyOb.parseRequestBody(org.openapi4j.parser.model.v3.RequestBody requestBody){ RequestBodyObject requestBodyObject = new RequestBodyObject(); if( requestBody.getContentMediaTypes() != null ) { @@ -511,7 +510,7 @@ public static EncodingObject EncodingObject.parseEncoding(EncodingProperty encod return encodingObject; } -public static ResponseObject ResponseObject.parseResponse(Response response){ +public static ResponseObject ResponseOb.parseResponse(Response response){ ResponseObject responseObject = new ResponseObject(); if( response.isRef() ) @@ -534,7 +533,7 @@ public static ResponseObject ResponseObject.parseResponse(Response response){ return responseObject; } -public static CallbackObject CallbackObject.parseCallback(Callback callback){ +public static CallbackObject CallbackOb.parseCallback(Callback callback){ CallbackObject callbackObject = new CallbackObject(); if( callback.getCallbackPaths() != null ){ @@ -545,7 +544,7 @@ public static CallbackObject CallbackObject.parseCallback(Callback callback){ return callbackObject; } -public static ExampleObject ExampleObject.parseExample(Example example){ +public static ExampleObject ExampleOb.parseExample(Example example){ ExampleObject exampleObject = new ExampleObject(); if( example.getSummary() != null ) @@ -564,7 +563,7 @@ public static ExampleObject ExampleObject.parseExample(Example example){ return exampleObject; } -public static LinkObject LinkObject.parseLink(Link link){ +public static LinkObject LinkOb.parseLink(Link link){ LinkObject linkObject = new LinkObject(); if( link.isRef() ) @@ -585,7 +584,7 @@ public static LinkObject LinkObject.parseLink(Link link){ return linkObject; } -public static HeaderObject HeaderObject.parseHeader(Header header){ +public static HeaderObject HeaderOb.parseHeader(Header header){ HeaderObject headerObject = new HeaderObject(); if( header.isRef() ) @@ -635,7 +634,7 @@ public static TagObject TagObject.parseTag(org.openapi4j.parser.model.v3.Tag tag return tagObject; } -public static SchemaObject SchemaObject.parseSchema (org.openapi4j.parser.model.v3.Schema schema) { +public static SchemaObject SchemaOb.parseSchema (org.openapi4j.parser.model.v3.Schema schema) { SchemaObject schemaObject = new SchemaObject(); if( schema.isRef() ) @@ -789,7 +788,7 @@ public static XmlObject XmlObject.parseXml (Xml xml) { return xmlObject; } -public static SecuritySchemeObject SecuritySchemeObject.parseSecurityScheme(SecurityScheme securityScheme){ +public static SecuritySchemeObject SecuritySchemeOb.parseSecurityScheme(SecurityScheme securityScheme){ SecuritySchemeObject securitySchemeObject = new SecuritySchemeObject(); if( securityScheme.getType() != null ) diff --git a/target/classes/1password.com-events-1.0.0.json b/target/classes/1password.com-events-1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..503bd16ffec96123ae4000b54e372892f8953977 --- /dev/null +++ b/target/classes/1password.com-events-1.0.0.json @@ -0,0 +1,518 @@ +{ + "openapi": "3.0.0", + "servers": [ + { + "description": "1Password", + "url": "https://events.1password.com" + }, + { + "description": "1Password CA", + "url": "https://events.1password.ca" + }, + { + "description": "1Password EU", + "url": "https://events.1password.eu" + }, + { + "description": "1Password Enterprise", + "url": "https://events.ent.1password.com" + } + ], + "info": { + "description": "1Password Events API Specification.", + "title": "Events API", + "version": "1.0.0", + "x-apisguru-categories": [ + "security" + ], + "x-logo": { + "url": "https://api.apis.guru/v2/cache/logo/https_upload.wikimedia.org_wikipedia_commons_thumb_e_e3_1password-logo.svg_1280px-1password-logo.svg.png" + }, + "x-origin": [ + { + "format": "openapi", + "url": "https://i.1password.com/media/1password-events-reporting/1password-events-api.yaml", + "version": "3.0" + } + ], + "x-providerName": "1password.com", + "x-serviceName": "events" + }, + "paths": { + "/api/auth/introspect": { + "get": { + "operationId": "getAuthIntrospect", + "responses": { + "200": { + "$ref": "#/components/responses/IntrospectResponse" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedErrorResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "security": [ + { + "jwtsa": [] + } + ], + "summary": "Performs introspection of the provided Bearer JWT token", + "tags": [ + "auth" + ] + } + }, + "/api/v1/itemusages": { + "post": { + "description": "This endpoint requires your JSON Web Token to have the *itemusages* feature.", + "operationId": "getItemUsages", + "requestBody": { + "$ref": "#/components/requestBodies/ItemUsagesRequest" + }, + "responses": { + "200": { + "$ref": "#/components/responses/ItemUsagesResponse" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedErrorResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "security": [ + { + "jwtsa": [] + } + ], + "summary": "Retrieves item usages", + "tags": [ + "api-v1" + ] + } + }, + "/api/v1/signinattempts": { + "post": { + "description": "This endpoint requires your JSON Web Token to have the *signinattempts* feature.", + "operationId": "getSignInAttempts", + "requestBody": { + "$ref": "#/components/requestBodies/SignInAttemptsRequest" + }, + "responses": { + "200": { + "$ref": "#/components/responses/SignInAttemptsResponse" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedErrorResponse" + }, + "default": { + "$ref": "#/components/responses/GenericErrorResponse" + } + }, + "security": [ + { + "jwtsa": [] + } + ], + "summary": "Retrieves sign-in attempts", + "tags": [ + "api-v1" + ] + } + } + }, + "components": { + "examples": { + "Cursor": { + "summary": "Used for continued calling with a cursor", + "value": { + "cursor": "aGVsbG8hIGlzIGl0IG1lIHlvdSBhcmUgbG9va2luZyBmb3IK" + } + }, + "ResetCursor": { + "summary": "Used for reseting the cursor", + "value": { + "limit": 100, + "start_time": "2021-06-11T16:32:50-03:00" + } + } + }, + "requestBodies": { + "CursorRequest": { + "content": { + "application/json": { + "examples": { + "Continuing cursor": { + "$ref": "#/components/examples/Cursor" + }, + "Resetting cursor": { + "$ref": "#/components/examples/ResetCursor" + } + }, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/Cursor" + }, + { + "$ref": "#/components/schemas/ResetCursor" + } + ] + } + } + } + }, + "ItemUsagesRequest": { + "$ref": "#/components/requestBodies/CursorRequest" + }, + "SignInAttemptsRequest": { + "$ref": "#/components/requestBodies/CursorRequest" + } + }, + "responses": { + "GenericErrorResponse": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Generic error" + }, + "IntrospectResponse": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Introspection" + } + } + }, + "description": "Introspection object" + }, + "ItemUsagesResponse": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ItemUsageItems" + } + } + }, + "description": "Item usages response object" + }, + "SignInAttemptsResponse": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignInAttemptItems" + } + } + }, + "description": "Sign-in attempts response object" + }, + "UnauthorizedErrorResponse": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Unauthorized" + } + }, + "schemas": { + "Client": { + "description": "Metadata gathered about the client", + "properties": { + "app_name": { + "example": "1Password Extension", + "type": "string" + }, + "app_version": { + "example": "20127", + "type": "string" + }, + "ip_address": { + "example": "13.227.95.22", + "type": "string" + }, + "os_name": { + "example": "MacOSX", + "type": "string" + }, + "os_version": { + "example": "10.15.6", + "type": "string" + }, + "platform_name": { + "example": "Chrome", + "type": "string" + }, + "platform_version": { + "description": "Depending on the platform used, this can be the version of the browser that the client extension is installed, the model of computer that the native application is installed or the machine's CPU version that the CLI was installed", + "type": "string" + } + } + }, + "Cursor": { + "description": "Cursor", + "properties": { + "cursor": { + "description": "Cursor to fetch more data if available or continue the polling process if required", + "example": "aGVsbG8hIGlzIGl0IG1lIHlvdSBhcmUgbG9va2luZyBmb3IK", + "type": "string" + } + } + }, + "CursorCollection": { + "allOf": [ + { + "$ref": "#/components/schemas/Cursor" + }, + { + "properties": { + "has_more": { + "description": "Whether there may still be more data to fetch using the returned cursor. If true, the subsequent request could still be empty.", + "type": "boolean" + } + } + } + ], + "description": "Common cursor properties for collection responses" + }, + "DateTimeRFC3339": { + "example": "2020-06-11T16:32:50-03:00", + "format": "date-time", + "type": "string" + }, + "Details": { + "description": "Additional information about the sign-in attempt", + "properties": { + "value": { + "description": "For firewall prevented sign-ins, the value is the chosen continent, country, etc. that blocked the sign-in attempt", + "example": "Europe", + "type": "string" + } + } + }, + "Error": { + "properties": { + "Error": { + "properties": { + "Message": { + "description": "The error message.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "Introspection": { + "properties": { + "Features": { + "example": [ + "itemusages", + "signinattempts" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "IssuedAt": { + "$ref": "#/components/schemas/DateTimeRFC3339" + }, + "UUID": { + "type": "string" + } + }, + "type": "object" + }, + "ItemUsage": { + "description": "A single item usage object", + "properties": { + "client": { + "$ref": "#/components/schemas/Client" + }, + "item_uuid": { + "$ref": "#/components/schemas/UUID" + }, + "timestamp": { + "$ref": "#/components/schemas/DateTimeRFC3339" + }, + "used_version": { + "type": "integer" + }, + "user": { + "$ref": "#/components/schemas/User" + }, + "uuid": { + "$ref": "#/components/schemas/UUID" + }, + "vault_uuid": { + "$ref": "#/components/schemas/UUID" + } + } + }, + "ItemUsageItems": { + "allOf": [ + { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/ItemUsage" + }, + "type": "array" + } + } + }, + { + "$ref": "#/components/schemas/CursorCollection" + } + ], + "description": "An object wrapping cursor properties and a list of items usages" + }, + "ResetCursor": { + "description": "Reset cursor", + "properties": { + "end_time": { + "$ref": "#/components/schemas/DateTimeRFC3339" + }, + "limit": { + "maximum": 1000, + "minimum": 1, + "type": "number" + }, + "start_time": { + "$ref": "#/components/schemas/DateTimeRFC3339" + } + } + }, + "SignInAttempt": { + "description": "A single sign-in attempt object", + "properties": { + "category": { + "enum": [ + "success", + "credentials_failed", + "mfa_failed", + "modern_version_failed", + "firewall_failed", + "firewall_reported_success" + ], + "example": "firewall_failed", + "type": "string" + }, + "client": { + "$ref": "#/components/schemas/Client" + }, + "country": { + "description": "Country ISO Code", + "example": "France", + "type": "string" + }, + "details": { + "$ref": "#/components/schemas/Details" + }, + "session_uuid": { + "$ref": "#/components/schemas/UUID" + }, + "target_user": { + "$ref": "#/components/schemas/User" + }, + "timestamp": { + "$ref": "#/components/schemas/DateTimeRFC3339" + }, + "type": { + "enum": [ + "credentials_ok", + "mfa_ok", + "password_secret_bad", + "mfa_missing", + "totp_disabled", + "totp_bad", + "totp_timeout", + "u2f_disabled", + "u2f_bad", + "u2f_timout", + "duo_disabled", + "duo_bad", + "duo_timeout", + "duo_native_bad", + "platform_secret_disabled", + "platform_secret_bad", + "platform_secret_proxy", + "code_disabled", + "code_bad", + "code_timeout", + "ip_blocked", + "continent_blocked", + "country_blocked", + "anonymous_blocked", + "all_blocked", + "modern_version_missing", + "modern_version_old" + ], + "example": "continent_blocked", + "type": "string" + }, + "uuid": { + "$ref": "#/components/schemas/UUID" + } + } + }, + "SignInAttemptItems": { + "allOf": [ + { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/SignInAttempt" + }, + "type": "array" + } + } + }, + { + "$ref": "#/components/schemas/CursorCollection" + } + ], + "description": "An object wrapping cursor properties and a list of sign-in attempts" + }, + "UUID": { + "example": "56YE2TYN2VFYRLNSHKPW5NVT5E", + "type": "string" + }, + "User": { + "description": "User object", + "properties": { + "email": { + "format": "email", + "type": "string" + }, + "name": { + "description": "Full name", + "example": "Jack O'Neill", + "type": "string" + }, + "uuid": { + "$ref": "#/components/schemas/UUID" + } + } + } + }, + "securitySchemes": { + "jwtsa": { + "bearerFormat": "JWT-SA", + "description": "A JWT SA token issued to this service", + "scheme": "bearer", + "type": "http" + } + } + } +} \ No newline at end of file diff --git a/target/classes/6-dot-authentiqio.appspot.com-6.json b/target/classes/6-dot-authentiqio.appspot.com-6.json new file mode 100644 index 0000000000000000000000000000000000000000..a59849b181dd559f4edf09085625cf2d19a901ee --- /dev/null +++ b/target/classes/6-dot-authentiqio.appspot.com-6.json @@ -0,0 +1,998 @@ +{ + "openapi": "3.0.0", + "servers": [ + { + "url": "https://6-dot-authentiqio.appspot.com" + } + ], + "info": { + "contact": { + "email": "hello@authentiq.com", + "name": "Authentiq team", + "url": "http://authentiq.io/support" + }, + "description": "Strong authentication, without the passwords.", + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "http://authentiq.com/terms/", + "title": "Authentiq API", + "version": "6", + "x-apisguru-categories": [ + "security" + ], + "x-logo": { + "backgroundColor": "#F26641", + "url": "https://api.apis.guru/v2/cache/logo/https_www.authentiq.com_theme_images_authentiq-logo-a-inverse.svg" + }, + "x-origin": [ + { + "format": "openapi", + "url": "https://raw.githubusercontent.com/AuthentiqID/authentiq-docs/master/docs/swagger/issuer.yaml", + "version": "3.0" + } + ], + "x-providerName": "6-dot-authentiqio.appspot.com" + }, + "paths": { + "/key": { + "delete": { + "description": "Revoke an Authentiq ID using email & phone.\n\nIf called with `email` and `phone` only, a verification code \nwill be sent by email. Do a second call adding `code` to \ncomplete the revocation.\n", + "operationId": "key_revoke_nosecret", + "parameters": [ + { + "description": "primary email associated to Key (ID)", + "in": "query", + "name": "email", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "primary phone number, international representation", + "in": "query", + "name": "phone", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "verification code sent by email", + "in": "query", + "name": "code", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "pending or done", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successfully deleted" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Authentication error `auth-error`" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Unknown key `unknown-key`" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Confirm with code sent `confirm-first`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "key", + "delete" + ] + }, + "post": { + "description": "Register a new ID `JWT(sub, devtoken)`\n\nv5: `JWT(sub, pk, devtoken, ...)`\n\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\n", + "operationId": "key_register", + "requestBody": { + "$ref": "#/components/requestBodies/AuthentiqID" + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "secret": { + "description": "revoke key", + "type": "string" + }, + "status": { + "description": "registered", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successfully registered" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Key already registered `duplicate-key`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "key", + "post" + ] + } + }, + "/key/{PK}": { + "delete": { + "description": "Revoke an Identity (Key) with a revocation secret", + "operationId": "key_revoke", + "parameters": [ + { + "$ref": "#/components/parameters/PK" + }, + { + "description": "revokation secret", + "in": "query", + "name": "secret", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "done", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Key not found / wrong code `auth-error`" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Unknown key `unknown-key`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "key", + "delete" + ] + }, + "get": { + "description": "Get public details of an Authentiq ID.\n", + "operationId": "key_retrieve", + "parameters": [ + { + "$ref": "#/components/parameters/PK" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "since": { + "format": "date-time", + "type": "string" + }, + "status": { + "type": "string" + }, + "sub": { + "description": "base64safe encoded public signing key", + "type": "string" + } + }, + "title": "JWT", + "type": "object" + } + } + }, + "description": "Successfully retrieved" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Unknown key `unknown-key`" + }, + "410": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Key is revoked (gone). `revoked-key`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "key", + "get" + ] + }, + "head": { + "description": "HEAD info on Authentiq ID\n", + "parameters": [ + { + "$ref": "#/components/parameters/PK" + } + ], + "responses": { + "200": { + "description": "Key exists" + }, + "404": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Unknown key `unknown-key`" + }, + "410": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Key is revoked `revoked-key`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "key", + "head" + ] + }, + "post": { + "description": "update properties of an Authentiq ID.\n(not operational in v4; use PUT for now)\n\nv5: POST issuer-signed email & phone scopes in\na self-signed JWT\n\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\n", + "operationId": "key_update", + "parameters": [ + { + "$ref": "#/components/parameters/PK" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/AuthentiqID" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "confirmed", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successfully updated" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Unknown key `unknown-key`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "key", + "post" + ] + }, + "put": { + "description": "Update Authentiq ID by replacing the object.\n\nv4: `JWT(sub,email,phone)` to bind email/phone hash; \n\nv5: POST issuer-signed email & phone scopes\nand PUT to update registration `JWT(sub, pk, devtoken, ...)`\n\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\n", + "operationId": "key_bind", + "parameters": [ + { + "$ref": "#/components/parameters/PK" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/AuthentiqID" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "confirmed", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successfully updated" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Unknown key `unknown-key`" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Already bound to another key `duplicate-hash`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "key", + "put" + ] + } + }, + "/login": { + "post": { + "description": "push sign-in request\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\n", + "operationId": "push_login_request", + "parameters": [ + { + "description": "URI App will connect to", + "in": "query", + "name": "callback", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/jwt": { + "schema": { + "$ref": "#/components/schemas/PushToken" + } + } + }, + "description": "Push Token.", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "sent", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Unauthorized for this callback audience `aud-error` or JWT should be self-signed `auth-error`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "login", + "post" + ] + } + }, + "/scope": { + "post": { + "description": "scope verification request\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\n", + "operationId": "sign_request", + "parameters": [ + { + "description": "test only mode, using test issuer", + "in": "query", + "name": "test", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/jwt": { + "schema": { + "$ref": "#/components/schemas/Claims" + } + } + }, + "description": "Claims of scope", + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "job": { + "description": "20-character ID", + "type": "string" + }, + "status": { + "description": "waiting", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successful response" + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Too Many Requests on same address / number `rate-limit`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "scope", + "post" + ] + } + }, + "/scope/{job}": { + "delete": { + "description": "delete a verification job", + "operationId": "sign_delete", + "parameters": [ + { + "$ref": "#/components/parameters/JobID" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "done", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successfully deleted" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Job not found `unknown-job`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "scope", + "delete" + ] + }, + "get": { + "description": "get the status / current content of a verification job", + "operationId": "sign_retrieve", + "parameters": [ + { + "$ref": "#/components/parameters/JobID" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "exp": { + "type": "integer" + }, + "field": { + "type": "string" + }, + "sub": { + "description": "base64safe encoded public signing key", + "type": "string" + } + }, + "title": "JWT", + "type": "object" + } + }, + "application/jwt": { + "schema": { + "properties": { + "exp": { + "type": "integer" + }, + "field": { + "type": "string" + }, + "sub": { + "description": "base64safe encoded public signing key", + "type": "string" + } + }, + "title": "JWT", + "type": "object" + } + } + }, + "description": "Successful response (JWT)" + }, + "204": { + "description": "Confirmed, waiting for signing" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + }, + "application/jwt": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Job not found `unknown-job`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "scope", + "get" + ] + }, + "head": { + "description": "HEAD to get the status of a verification job", + "operationId": "sign_retrieve_head", + "parameters": [ + { + "$ref": "#/components/parameters/JobID" + } + ], + "responses": { + "200": { + "description": "Confirmed and signed" + }, + "204": { + "description": "Confirmed, waiting for signing" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Job not found `unknown-job`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "scope", + "head" + ] + }, + "post": { + "description": "this is a scope confirmation", + "operationId": "sign_confirm", + "parameters": [ + { + "$ref": "#/components/parameters/JobID" + } + ], + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "confirmed", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successfully confirmed" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Confirmation error `auth-error`" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Job not found `unknown-job`" + }, + "405": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "JWT POSTed to scope `not-supported`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "scope", + "post" + ] + }, + "put": { + "description": "authority updates a JWT with its signature\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\n", + "operationId": "sign_update", + "parameters": [ + { + "$ref": "#/components/parameters/JobID" + } + ], + "responses": { + "200": { + "content": { + "application/jwt": { + "schema": { + "properties": { + "jwt": { + "description": "result is JWT or JSON??", + "type": "string" + }, + "status": { + "description": "ready", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Successfully updated" + }, + "404": { + "content": { + "application/jwt": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Job not found `unknown-job`" + }, + "409": { + "content": { + "application/jwt": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Job not confirmed yet `confirm-first`" + }, + "default": { + "$ref": "#/components/responses/ErrorResponse" + } + }, + "tags": [ + "scope", + "put" + ] + } + } + }, + "components": { + "parameters": { + "JobID": { + "description": "Job ID (20 chars)", + "in": "path", + "name": "job", + "required": true, + "schema": { + "type": "string" + } + }, + "PK": { + "description": "Public Signing Key - Authentiq ID (43 chars)", + "in": "path", + "name": "PK", + "required": true, + "schema": { + "type": "string" + } + } + }, + "requestBodies": { + "AuthentiqID": { + "content": { + "application/jwt": { + "schema": { + "$ref": "#/components/schemas/AuthentiqID" + } + } + }, + "description": "Authentiq ID to register", + "required": true + } + }, + "responses": { + "ErrorResponse": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Error response" + } + }, + "schemas": { + "AuthentiqID": { + "description": "Authentiq ID in JWT format, self-signed.\n", + "properties": { + "devtoken": { + "description": "device token for push messages", + "type": "string" + }, + "sub": { + "description": "UUID and public signing key", + "type": "string" + } + }, + "required": [ + "sub" + ] + }, + "Claims": { + "description": "Claim in JWT format, self- or issuer-signed. \n", + "properties": { + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "scope": { + "description": "claim scope", + "type": "string" + }, + "sub": { + "description": "UUID", + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "sub", + "scope" + ] + }, + "Error": { + "properties": { + "detail": { + "type": "string" + }, + "error": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "type": { + "description": "unique uri for this error", + "type": "string" + } + }, + "required": [ + "error" + ] + }, + "PushToken": { + "description": "PushToken in JWT format, self-signed. \n", + "properties": { + "aud": { + "description": "audience (URI)", + "type": "string" + }, + "exp": { + "type": "integer" + }, + "iat": { + "type": "integer" + }, + "iss": { + "description": "issuer (URI)", + "type": "string" + }, + "nbf": { + "type": "integer" + }, + "sub": { + "description": "UUID and public signing key", + "type": "string" + } + }, + "required": [ + "sub", + "iss", + "aud" + ] + } + } + } +} \ No newline at end of file diff --git a/target/classes/abstractapi.com-geolocation-1.0.0.json b/target/classes/abstractapi.com-geolocation-1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..48bc4de4321744b85ff9853799c4c27c31bd611a --- /dev/null +++ b/target/classes/abstractapi.com-geolocation-1.0.0.json @@ -0,0 +1,233 @@ +{ + "openapi": "3.0.1", + "servers": [ + { + "url": "https://ipgeolocation.abstractapi.com" + } + ], + "info": { + "description": "Abstract IP geolocation API allows developers to retrieve the region, country and city behind any IP worldwide. The API covers the geolocation of IPv4 and IPv6 addresses in 180+ countries worldwide. Extra information can be retrieved like the currency, flag or language associated to an IP.", + "title": "IP geolocation API", + "version": "1.0.0", + "x-apisguru-categories": [ + "location" + ], + "x-logo": { + "url": "https://api.apis.guru/v2/cache/logo/https_global-uploads.webflow.com_5ebbd0a566a3996636e55959_5ec2ba29feeeb05d69160e7b_webclip.png" + }, + "x-origin": [ + { + "format": "openapi", + "url": "https://documentation.abstractapi.com/ip-geolocation-openapi.json", + "version": "3.0" + } + ], + "x-providerName": "abstractapi.com", + "x-serviceName": "geolocation" + }, + "externalDocs": { + "description": "API Documentation", + "url": "https://www.abstractapi.com/ip-geolocation-api#docs" + }, + "paths": { + "/v1": { + "get": { + "description": "Retrieve the location of an IP address", + "parameters": [ + { + "explode": true, + "in": "query", + "name": "api_key", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "ip_address", + "required": false, + "schema": { + "example": "195.154.25.40", + "type": "string" + }, + "style": "form" + }, + { + "explode": true, + "in": "query", + "name": "fields", + "required": false, + "schema": { + "example": "country,city,timezone", + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"ip_address\":\"195.154.25.40\",\"city\":\"Paris\",\"city_geoname_id\":2988507,\"region\":\"Île-de-France\",\"region_iso_code\":\"IDF\",\"region_geoname_id\":3012874,\"postal_code\":\"75008\",\"country\":\"France\",\"country_code\":\"FR\",\"country_geoname_id\":3017382,\"country_is_eu\":true,\"continent\":\"Europe\",\"continent_code\":\"EU\",\"continent_geoname_id\":6255148,\"longitude\":2.4075,\"latitude\":48.8323,\"security\":{\"is_vpn\":false},\"timezone\":{\"name\":\"Europe/Paris\",\"abbreviation\":\"CEST\",\"gmt_offset\":2,\"current_time\":\"15:42:18\",\"is_dst\":true},\"flag\":{\"emoji\":\"<ë<÷\",\"unicode\":\"U+1F1EB U+1F1F7\",\"png\":\"https://static.abstractapi.com/country-flags/FR_flag.png\",\"svg\":\"https://static.abstractapi.com/country-flags/FR_flag.svg\"},\"currency\":{\"currency_name\":\"Euros\",\"currency_code\":\"EUR\"},\"connection\":{\"autonomous_system_number\":12876,\"autonomous_system_organization\":\"Online S.a.s.\",\"connection_type\":\"Corporate\",\"isp_name\":\"Online S.A.S.\",\"organization_name\":\"ONLINE\"}}" + } + }, + "schema": { + "$ref": "#/components/schemas/inline_response_200" + } + } + }, + "description": "Location of geolocated IP" + } + }, + "servers": [ + { + "url": "https://ipgeolocation.abstractapi.com" + } + ] + }, + "servers": [ + { + "url": "https://ipgeolocation.abstractapi.com" + } + ] + } + }, + "components": { + "schemas": { + "inline_response_200": { + "properties": { + "city": { + "type": "string" + }, + "city_geoname_id": { + "type": "integer" + }, + "connection": { + "properties": { + "autonomous_system_number": { + "type": "integer" + }, + "autonomous_system_organization": { + "type": "string" + }, + "connection_type": { + "type": "string" + }, + "isp_name": { + "type": "string" + }, + "organization_name": { + "type": "string" + } + }, + "type": "object" + }, + "continent": { + "type": "string" + }, + "continent_code": { + "type": "string" + }, + "continent_geoname_id": { + "type": "integer" + }, + "country": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "country_geoname_id": { + "type": "integer" + }, + "country_is_eu": { + "type": "boolean" + }, + "currency": { + "properties": { + "currency_code": { + "type": "string" + }, + "currency_name": { + "type": "string" + } + }, + "type": "object" + }, + "flag": { + "properties": { + "emoji": { + "type": "string" + }, + "png": { + "type": "string" + }, + "svg": { + "type": "string" + }, + "unicode": { + "type": "string" + } + }, + "type": "object" + }, + "ip_address": { + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "postal_code": { + "type": "string" + }, + "region": { + "type": "string" + }, + "region_geoname_id": { + "type": "integer" + }, + "region_iso_code": { + "type": "string" + }, + "security": { + "properties": { + "is_vpn": { + "type": "boolean" + } + }, + "type": "object" + }, + "timezone": { + "properties": { + "abbreviation": { + "type": "string" + }, + "current_time": { + "type": "string" + }, + "gmt_offset": { + "type": "integer" + }, + "is_dst": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } +} \ No newline at end of file diff --git a/target/classes/adyen.com-CheckoutUtilityService-1.json b/target/classes/adyen.com-CheckoutUtilityService-1.json new file mode 100644 index 0000000000000000000000000000000000000000..f673d45542efe72d5058d08761681bc4899eb2e1 --- /dev/null +++ b/target/classes/adyen.com-CheckoutUtilityService-1.json @@ -0,0 +1,117 @@ +{ + "openapi": "3.0.0", + "servers": [ + { + "url": "https://checkout-test.adyen.com/v1" + } + ], + "info": { + "contact": { + "email": "support@adyen.com", + "name": "Adyen Support", + "url": "https://support.adyen.com/", + "x-twitter": "Adyen" + }, + "description": "A web service containing utility functions available for merchants integrating with Checkout APIs.\n## Authentication\nEach request to the Checkout Utility API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the Checkout API key](https://docs.adyen.com/developers/user-management/how-to-get-the-checkout-api-key). Then set this key to the `X-API-Key` header value, for example:\n\n```\ncurl\n-H \"Content-Type: application/json\" \\\n-H \"X-API-Key: Your_Checkout_API_key\" \\\n...\n```\nNote that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/developers/api-reference/live-endpoints).\n\n## Versioning\nCheckout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.\n\nFor example:\n```\nhttps://checkout-test.adyen.com/v1/originKeys\n```", + "termsOfService": "https://docs.adyen.com/legal/terms-conditions", + "title": "Adyen Checkout Utility Service", + "version": "1", + "x-apisguru-categories": [ + "payment" + ], + "x-logo": { + "url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_Adyen_profile_image.jpeg" + }, + "x-origin": [ + { + "converter": { + "url": "https://github.com/lucybot/api-spec-converter", + "version": "2.7.11" + }, + "format": "openapi", + "url": "https://raw.githubusercontent.com/adyen/adyen-openapi/master/specs/3.0/CheckoutUtilityService-v1.json", + "version": "3.0" + } + ], + "x-providerName": "adyen.com", + "x-serviceName": "CheckoutUtilityService" + }, + "paths": { + "/originKeys": { + "post": { + "description": "This operation takes the origin domains and returns a JSON object containing the corresponding origin keys for the domains.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CheckoutUtilityRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CheckoutUtilityResponse" + } + } + }, + "description": "OK - the request has succeeded." + }, + "400": { + "description": "Bad Request - a problem reading or understanding the request." + }, + "401": { + "description": "Unauthorized - authentication required." + }, + "403": { + "description": "Forbidden - insufficient permissions to process the request." + }, + "422": { + "description": "Unprocessable Entity - a request validation error." + }, + "500": { + "description": "Internal Server Error - the server could not process the request." + } + }, + "summary": "Create originKey values for one or more merchant domains.", + "x-groupName": "General", + "x-sortIndex": 0 + } + } + }, + "components": { + "schemas": { + "CheckoutUtilityRequest": { + "properties": { + "originDomains": { + "description": "The list of origin domains, for which origin keys are requested.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "originDomains" + ] + }, + "CheckoutUtilityResponse": { + "properties": { + "originKeys": { + "additionalProperties": { + "type": "string" + }, + "description": "The list of origin keys for all requested domains. For each list item, the key is the domain and the value is the origin key.", + "type": "object" + } + } + } + } + }, + "x-groups": [ + "General" + ] +} \ No newline at end of file diff --git a/target/classes/api-with-examples.json b/target/classes/api-with-examples.json deleted file mode 100644 index 0fd2077b3e00e0e735283cfaef254627fba6d47f..0000000000000000000000000000000000000000 --- a/target/classes/api-with-examples.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "Simple API overview", - "version": "2.0.0" - }, - "paths": { - "/": { - "get": { - "operationId": "listVersionsv2", - "summary": "List API versions", - "responses": { - "200": { - "description": "200 response", - "content": { - "application/json": { - "examples": { - "foo": { - "value": { - "versions": [ - { - "status": "CURRENT", - "updated": "2011-01-21T11:33:21Z", - "id": "v2.0", - "links": [ - { - "href": "http://127.0.0.1:8774/v2/", - "rel": "self" - } - ] - }, - { - "status": "EXPERIMENTAL", - "updated": "2013-07-23T11:33:21Z", - "id": "v3.0", - "links": [ - { - "href": "http://127.0.0.1:8774/v3/", - "rel": "self" - } - ] - } - ] - } - } - } - } - } - }, - "300": { - "description": "300 response", - "content": { - "application/json": { - "examples": { - "foo": { - "value": "{\n \"versions\": [\n {\n \"status\": \"CURRENT\",\n \"updated\": \"2011-01-21T11:33:21Z\",\n \"id\": \"v2.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v2/\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"status\": \"EXPERIMENTAL\",\n \"updated\": \"2013-07-23T11:33:21Z\",\n \"id\": \"v3.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v3/\",\n \"rel\": \"self\"\n }\n ]\n }\n ]\n}\n" - } - } - } - } - } - } - } - }, - "/v2": { - "get": { - "operationId": "getVersionDetailsv2", - "summary": "Show API version details", - "responses": { - "200": { - "description": "200 response", - "content": { - "application/json": { - "examples": { - "foo": { - "value": { - "version": { - "status": "CURRENT", - "updated": "2011-01-21T11:33:21Z", - "media-types": [ - { - "base": "application/xml", - "type": "application/vnd.openstack.compute+xml;version=2" - }, - { - "base": "application/json", - "type": "application/vnd.openstack.compute+json;version=2" - } - ], - "id": "v2.0", - "links": [ - { - "href": "http://127.0.0.1:8774/v2/", - "rel": "self" - }, - { - "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", - "type": "application/pdf", - "rel": "describedby" - }, - { - "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", - "type": "application/vnd.sun.wadl+xml", - "rel": "describedby" - }, - { - "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", - "type": "application/vnd.sun.wadl+xml", - "rel": "describedby" - } - ] - } - } - } - } - } - } - }, - "203": { - "description": "203 response", - "content": { - "application/json": { - "examples": { - "foo": { - "value": { - "version": { - "status": "CURRENT", - "updated": "2011-01-21T11:33:21Z", - "media-types": [ - { - "base": "application/xml", - "type": "application/vnd.openstack.compute+xml;version=2" - }, - { - "base": "application/json", - "type": "application/vnd.openstack.compute+json;version=2" - } - ], - "id": "v2.0", - "links": [ - { - "href": "http://23.253.228.211:8774/v2/", - "rel": "self" - }, - { - "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", - "type": "application/pdf", - "rel": "describedby" - }, - { - "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", - "type": "application/vnd.sun.wadl+xml", - "rel": "describedby" - } - ] - } - } - } - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/target/classes/callback-example.json b/target/classes/callback-example.json deleted file mode 100644 index 9a4df39b45370fdc3139e7f682c41bad6f053bd5..0000000000000000000000000000000000000000 --- a/target/classes/callback-example.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "Callback Example", - "version": "1.0.0" - }, - "paths": { - "/streams": { - "post": { - "description": "subscribes a client to receive out-of-band data", - "parameters": [ - { - "name": "callbackUrl", - "in": "query", - "required": true, - "description": "the location where data will be sent. Must be network accessible\nby the source server\n", - "schema": { - "type": "string", - "format": "uri", - "example": "https://tonys-server.com" - } - } - ], - "responses": { - "201": { - "description": "subscription successfully created", - "content": { - "application/json": { - "schema": { - "description": "subscription information", - "required": [ - "subscriptionId" - ], - "properties": { - "subscriptionId": { - "description": "this unique identifier allows management of the subscription", - "type": "string", - "example": "2531329f-fb09-4ef7-887e-84e648214436" - } - } - } - } - } - } - }, - "callbacks": { - "onData": { - "{$request.query.callbackUrl}/data": { - "post": { - "requestBody": { - "description": "subscription payload", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "date-time" - }, - "userData": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "202": { - "description": "Your server implementation should return this HTTP status code\nif the data was received successfully\n" - }, - "204": { - "description": "Your server should return this HTTP status code if no longer interested\nin further updates\n" - } - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/target/classes/link-example.json b/target/classes/link-example.json deleted file mode 100644 index bc98e635f1a4c9a44f2f283a170c4dfd701dd306..0000000000000000000000000000000000000000 --- a/target/classes/link-example.json +++ /dev/null @@ -1,323 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "Link Example", - "version": "1.0.0" - }, - "paths": { - "/2.0/users/{username}": { - "get": { - "operationId": "getUserByName", - "parameters": [ - { - "name": "username", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The User", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - }, - "links": { - "userRepositories": { - "$ref": "#/components/links/UserRepositories" - } - } - } - } - } - }, - "/2.0/repositories/{username}": { - "get": { - "operationId": "getRepositoriesByOwner", - "parameters": [ - { - "name": "username", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "repositories owned by the supplied user", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/repository" - } - } - } - }, - "links": { - "userRepository": { - "$ref": "#/components/links/UserRepository" - } - } - } - } - } - }, - "/2.0/repositories/{username}/{slug}": { - "get": { - "operationId": "getRepository", - "parameters": [ - { - "name": "username", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The repository", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/repository" - } - } - }, - "links": { - "repositoryPullRequests": { - "$ref": "#/components/links/RepositoryPullRequests" - } - } - } - } - } - }, - "/2.0/repositories/{username}/{slug}/pullrequests": { - "get": { - "operationId": "getPullRequestsByRepository", - "parameters": [ - { - "name": "username", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "state", - "in": "query", - "schema": { - "type": "string", - "enum": [ - "open", - "merged", - "declined" - ] - } - } - ], - "responses": { - "200": { - "description": "an array of pull request objects", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/pullrequest" - } - } - } - } - } - } - } - }, - "/2.0/repositories/{username}/{slug}/pullrequests/{pid}": { - "get": { - "operationId": "getPullRequestsById", - "parameters": [ - { - "name": "username", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "a pull request object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pullrequest" - } - } - }, - "links": { - "pullRequestMerge": { - "$ref": "#/components/links/PullRequestMerge" - } - } - } - } - } - }, - "/2.0/repositories/{username}/{slug}/pullrequests/{pid}/merge": { - "post": { - "operationId": "mergePullRequest", - "parameters": [ - { - "name": "username", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "slug", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "the PR was successfully merged" - } - } - } - } - }, - "components": { - "links": { - "UserRepositories": { - "operationId": "getRepositoriesByOwner", - "parameters": { - "username": "$response.body#/username" - } - }, - "UserRepository": { - "operationId": "getRepository", - "parameters": { - "username": "$response.body#/owner/username", - "slug": "$response.body#/slug" - } - }, - "RepositoryPullRequests": { - "operationId": "getPullRequestsByRepository", - "parameters": { - "username": "$response.body#/owner/username", - "slug": "$response.body#/slug" - } - }, - "PullRequestMerge": { - "operationId": "mergePullRequest", - "parameters": { - "username": "$response.body#/author/username", - "slug": "$response.body#/repository/slug", - "pid": "$response.body#/id" - } - } - }, - "schemas": { - "user": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "uuid": { - "type": "string" - } - } - }, - "repository": { - "type": "object", - "properties": { - "slug": { - "type": "string" - }, - "owner": { - "$ref": "#/components/schemas/user" - } - } - }, - "pullrequest": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "title": { - "type": "string" - }, - "repository": { - "$ref": "#/components/schemas/repository" - }, - "author": { - "$ref": "#/components/schemas/user" - } - } - } - } - } -} \ No newline at end of file diff --git a/target/classes/petstore-expanded.json b/target/classes/petstore-expanded.json deleted file mode 100644 index 9bd527fa389b79aaa58bca2cb3410b8d06cb029e..0000000000000000000000000000000000000000 --- a/target/classes/petstore-expanded.json +++ /dev/null @@ -1,242 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "version": "1.0.0", - "title": "Swagger Petstore", - "description": "A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification", - "termsOfService": "http://swagger.io/terms/", - "contact": { - "name": "Swagger API Team", - "email": "apiteam@swagger.io", - "url": "http://swagger.io" - }, - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "servers": [ - { - "url": "http://petstore.swagger.io/api" - } - ], - "paths": { - "/pets": { - "get": { - "description": "Returns all pets from the system that the user has access to\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.\n\nSed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.\n", - "operationId": "findPets", - "parameters": [ - { - "name": "tags", - "in": "query", - "description": "tags to filter by", - "required": false, - "style": "form", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "limit", - "in": "query", - "description": "maximum number of results to return", - "required": false, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "pet response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Pet" - } - } - } - } - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - }, - "post": { - "description": "Creates a new pet in the store. Duplicates are allowed", - "operationId": "addPet", - "requestBody": { - "description": "Pet to add to the store", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewPet" - } - } - } - }, - "responses": { - "200": { - "description": "pet response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pet" - } - } - } - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/pets/{id}": { - "get": { - "description": "Returns a user based on a single ID, if the user does not have access to the pet", - "operationId": "find pet by id", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of pet to fetch", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "200": { - "description": "pet response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pet" - } - } - } - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - }, - "delete": { - "description": "deletes a single pet based on the ID supplied", - "operationId": "deletePet", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of pet to delete", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "204": { - "description": "pet deleted" - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Pet": { - "allOf": [ - { - "$ref": "#/components/schemas/NewPet" - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64" - } - } - } - ] - }, - "NewPet": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "tag": { - "type": "string" - } - } - }, - "Error": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - } - } - } - } - } -} \ No newline at end of file diff --git a/target/classes/petstore-v2.yaml b/target/classes/petstore-v2.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d9c83901aceddc0e82496f9a35fa14de8eaa6b80 --- /dev/null +++ b/target/classes/petstore-v2.yaml @@ -0,0 +1,738 @@ +openapi: 3.0.0 +servers: + - url: 'https://petstore.swagger.io/v2' +info: + description: >- + This is a sample server Petstore server. For this sample, you can use the api key + `special-key` to test the authorization filters. + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +paths: + /pet: + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + style: form + explode: false + deprecated: true + schema: + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid status value + security: + - petstore_auth: + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: >- + Multiple tags can be provided with comma separated strings. Use tag1, + tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + style: form + explode: false + schema: + type: array + items: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid tag value + security: + - petstore_auth: + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + delete: + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + parameters: + - name: api_key + in: header + required: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + type: string + format: binary + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid Order + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + '/store/order/{orderId}': + get: + tags: + - store + summary: Find purchase order by ID + description: >- + For valid response try integer IDs with value <= 5 or > 10. Other values + will generated exceptions + operationId: getOrderById + parameters: + - name: orderId + in: path + description: ID of pet that needs to be fetched + required: true + schema: + type: integer + format: int64 + minimum: 1 + maximum: 10 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: >- + For valid response try integer IDs with value < 1000. Anything above + 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + responses: + default: + description: successful operation + security: + - api_key: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + responses: + default: + description: successful operation + security: + - api_key: [] + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + responses: + default: + description: successful operation + security: + - api_key: [] + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + parameters: + - name: username + in: query + description: The user name for login + required: true + schema: + type: string + pattern: '^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$' + - name: password + in: query + description: The password for login in clear text + required: true + schema: + type: string + responses: + '200': + description: successful operation + headers: + Set-Cookie: + description: >- + Cookie authentication key for use with the `api_key` + apiKey authentication. + schema: + type: string + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + type: integer + format: int32 + X-Expires-After: + description: date in UTC when token expires + schema: + type: string + format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + responses: + default: + description: successful operation + security: + - api_key: [] + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + parameters: + - name: username + in: path + description: The name that needs to be fetched. Use user1 for testing. + required: true + schema: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + security: + - api_key: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + security: + - api_key: [] +externalDocs: + description: Find out more about Swagger + url: 'http://swagger.io' +components: + requestBodies: + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + securitySchemes: + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header + schemas: + Order: + title: Pet Order + description: An order for a pets from the pet store + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + title: Pet category + description: A category for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + pattern: '^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$' + xml: + name: Category + User: + title: a User + description: A User who is purchasing from the pet store + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + xml: + name: User + Tag: + title: Pet Tag + description: A tag for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + title: a Pet + description: A pet for sale in the pet store + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + category: + $ref: '#/components/schemas/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + deprecated: true + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + title: An uploaded response + description: Describes the result of uploading an image resource + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string diff --git a/target/classes/petstore.json b/target/classes/petstore.json deleted file mode 100644 index 583b1e09904230bdacc1e981bcba3989ab99f900..0000000000000000000000000000000000000000 --- a/target/classes/petstore.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "version": "1.0.0", - "title": "Swagger Petstore", - "license": { - "name": "MIT" - } - }, - "servers": [ - { - "url": "http://petstore.swagger.io/v1" - } - ], - "paths": { - "/pets": { - "get": { - "summary": "List all pets", - "operationId": "listPets", - "tags": [ - "pets" - ], - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "How many items to return at one time (max 100)", - "required": false, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "A paged array of pets", - "headers": { - "x-next": { - "description": "A link to the next page of responses", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pets" - } - } - } - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - }, - "post": { - "summary": "Create a pet", - "operationId": "createPets", - "tags": [ - "pets" - ], - "responses": { - "201": { - "description": "Null response" - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/pets/{petId}": { - "get": { - "summary": "Info for a specific pet", - "operationId": "showPetById", - "tags": [ - "pets" - ], - "parameters": [ - { - "name": "petId", - "in": "path", - "required": true, - "description": "The id of the pet to retrieve", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Expected response to a valid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pet" - } - } - } - }, - "default": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Pet": { - "type": "object", - "required": [ - "id", - "name" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "tag": { - "type": "string" - } - } - }, - "Pets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Pet" - } - }, - "Error": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - } - } - } - } - } -} \ No newline at end of file diff --git a/target/classes/uspto.json b/target/classes/uspto.json deleted file mode 100644 index cd32f64c5fdc47889037e810e6cff2312d2267c9..0000000000000000000000000000000000000000 --- a/target/classes/uspto.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "openapi": "3.0.1", - "servers": [ - { - "url": "{scheme}://developer.uspto.gov/ds-api", - "variables": { - "scheme": { - "description": "The Data Set API is accessible via https and http", - "enum": [ - "https", - "http" - ], - "default": "https" - } - } - } - ], - "info": { - "description": "The Data Set API (DSAPI) allows the public users to discover and search USPTO exported data sets. This is a generic API that allows USPTO users to make any CSV based data files searchable through API. With the help of GET call, it returns the list of data fields that are searchable. With the help of POST call, data can be fetched based on the filters on the field names. Please note that POST call is used to search the actual data. The reason for the POST call is that it allows users to specify any complex search criteria without worry about the GET size limitations as well as encoding of the input parameters.", - "version": "1.0.0", - "title": "USPTO Data Set API", - "contact": { - "name": "Open Data Portal", - "url": "https://developer.uspto.gov", - "email": "developer@uspto.gov" - } - }, - "tags": [ - { - "name": "metadata", - "description": "Find out about the data sets" - }, - { - "name": "search", - "description": "Search a data set" - } - ], - "paths": { - "/": { - "get": { - "tags": [ - "metadata" - ], - "operationId": "list-data-sets", - "summary": "List available data sets", - "responses": { - "200": { - "description": "Returns a list of data sets", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dataSetList" - }, - "example": { - "total": 2, - "apis": [ - { - "apiKey": "oa_citations", - "apiVersionNumber": "v1", - "apiUrl": "https://developer.uspto.gov/ds-api/oa_citations/v1/fields", - "apiDocumentationUrl": "https://developer.uspto.gov/ds-api-docs/index.html?url=https://developer.uspto.gov/ds-api/swagger/docs/oa_citations.json" - }, - { - "apiKey": "cancer_moonshot", - "apiVersionNumber": "v1", - "apiUrl": "https://developer.uspto.gov/ds-api/cancer_moonshot/v1/fields", - "apiDocumentationUrl": "https://developer.uspto.gov/ds-api-docs/index.html?url=https://developer.uspto.gov/ds-api/swagger/docs/cancer_moonshot.json" - } - ] - } - } - } - } - } - } - }, - "/{dataset}/{version}/fields": { - "get": { - "tags": [ - "metadata" - ], - "summary": "Provides the general information about the API and the list of fields that can be used to query the dataset.", - "description": "This GET API returns the list of all the searchable field names that are in the oa_citations. Please see the 'fields' attribute which returns an array of field names. Each field or a combination of fields can be searched using the syntax options shown below.", - "operationId": "list-searchable-fields", - "parameters": [ - { - "name": "dataset", - "in": "path", - "description": "Name of the dataset.", - "required": true, - "example": "oa_citations", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "description": "Version of the dataset.", - "required": true, - "example": "v1", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The dataset API for the given version is found and it is accessible to consume.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "The combination of dataset name and version is not found in the system or it is not published yet to be consumed by public.", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/{dataset}/{version}/records": { - "post": { - "tags": [ - "search" - ], - "summary": "Provides search capability for the data set with the given search criteria.", - "description": "This API is based on Solr/Lucene Search. The data is indexed using SOLR. This GET API returns the list of all the searchable field names that are in the Solr Index. Please see the 'fields' attribute which returns an array of field names. Each field or a combination of fields can be searched using the Solr/Lucene Syntax. Please refer https://lucene.apache.org/core/3_6_2/queryparsersyntax.html#Overview for the query syntax. List of field names that are searchable can be determined using above GET api.", - "operationId": "perform-search", - "parameters": [ - { - "name": "version", - "in": "path", - "description": "Version of the dataset.", - "required": true, - "schema": { - "type": "string", - "default": "v1" - } - }, - { - "name": "dataset", - "in": "path", - "description": "Name of the dataset. In this case, the default value is oa_citations", - "required": true, - "schema": { - "type": "string", - "default": "oa_citations" - } - } - ], - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - } - } - } - }, - "404": { - "description": "No matching record found for the given criteria." - } - }, - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "type": "object", - "properties": { - "criteria": { - "description": "Uses Lucene Query Syntax in the format of propertyName:value, propertyName:[num1 TO num2] and date range format: propertyName:[yyyyMMdd TO yyyyMMdd]. In the response please see the 'docs' element which has the list of record objects. Each record structure would consist of all the fields and their corresponding values.", - "type": "string", - "default": "*:*" - }, - "start": { - "description": "Starting record number. Default value is 0.", - "type": "integer", - "default": 0 - }, - "rows": { - "description": "Specify number of rows to be returned. If you run the search with default values, in the response you will see 'numFound' attribute which will tell the number of records available in the dataset.", - "type": "integer", - "default": 100 - } - }, - "required": [ - "criteria" - ] - } - } - } - } - } - } - }, - "components": { - "schemas": { - "dataSetList": { - "type": "object", - "properties": { - "total": { - "type": "integer" - }, - "apis": { - "type": "array", - "items": { - "type": "object", - "properties": { - "apiKey": { - "type": "string", - "description": "To be used as a dataset parameter value" - }, - "apiVersionNumber": { - "type": "string", - "description": "To be used as a version parameter value" - }, - "apiUrl": { - "type": "string", - "format": "uriref", - "description": "The URL describing the dataset's fields" - }, - "apiDocumentationUrl": { - "type": "string", - "format": "uriref", - "description": "A URL to the API console for each API" - } - } - } - } - } - } - } - } -} \ No newline at end of file