From 34fd74068af82bfc31601bfab7ee7eeb14e60ce5 Mon Sep 17 00:00:00 2001 From: Relism Date: Sun, 19 Apr 2026 23:42:50 +0200 Subject: [PATCH] implement OpenAPI contributor integration for rate limiting and response headers --- .ai/mcp/mcp.json | 0 .idea/misc.xml | 5 + .idea/workspace.xml | 185 +++++++----------- .../flash-ext-limiter/docs/annotation.md | 3 + .../flash-ext-limiter/docs/http-headers.md | 12 +- flash-extensions/flash-ext-limiter/pom.xml | 5 + .../relism/ext/limiter/LimiterExtension.java | 67 +++++++ .../limiter/LimiterOpenApiInteropTest.java | 84 ++++++++ .../dev/relism/ext/oidc/OidcExtension.java | 66 ++++--- .../ext/oidc/OidcOpenApiInteropTest.java | 40 ++-- flash-extensions/flash-ext-openapi/README.md | 28 +++ .../{ApiResponse.java => APIResponse.java} | 0 .../{ApiResponses.java => APIResponses.java} | 0 .../relism/ext/openapi/OpenApiBuilder.java | 128 +++++++++--- .../ext/openapi/OpenApiContributor.java | 14 ++ .../openapi/OpenApiContributorRegistry.java | 17 ++ .../relism/ext/openapi/OpenApiExtension.java | 10 +- .../openapi/OpenApiOperationContribution.java | 71 +++++++ .../openapi/OpenApiResponseContribution.java | 49 +++++ .../openapi/OpenApiSecurityContributor.java | 57 ------ .../ext/openapi/OpenApiSecurityRegistry.java | 31 --- .../ext/openapi/OpenApiBuilderTest.java | 104 +++++++++- .../src/main/resources/routeviewer/index.html | 22 +-- flash-extensions/flash-ext-view/README.md | 1 - .../docs/migration-from-legacy-view.md | 33 ---- .../WebBundlerExtensionIntegrationTest.java | 2 +- 26 files changed, 703 insertions(+), 331 deletions(-) create mode 100644 .ai/mcp/mcp.json create mode 100644 flash-extensions/flash-ext-limiter/src/test/java/dev/relism/ext/limiter/LimiterOpenApiInteropTest.java rename flash-extensions/flash-ext-openapi/src/main/java/dev/relism/ext/openapi/{ApiResponse.java => APIResponse.java} (100%) rename flash-extensions/flash-ext-openapi/src/main/java/dev/relism/ext/openapi/{ApiResponses.java => APIResponses.java} (100%) create mode 100644 flash-extensions/flash-ext-openapi/src/main/java/dev/relism/ext/openapi/OpenApiContributor.java create mode 100644 flash-extensions/flash-ext-openapi/src/main/java/dev/relism/ext/openapi/OpenApiContributorRegistry.java create mode 100644 flash-extensions/flash-ext-openapi/src/main/java/dev/relism/ext/openapi/OpenApiOperationContribution.java create mode 100644 flash-extensions/flash-ext-openapi/src/main/java/dev/relism/ext/openapi/OpenApiResponseContribution.java delete mode 100644 flash-extensions/flash-ext-openapi/src/main/java/dev/relism/ext/openapi/OpenApiSecurityContributor.java delete mode 100644 flash-extensions/flash-ext-openapi/src/main/java/dev/relism/ext/openapi/OpenApiSecurityRegistry.java delete mode 100644 flash-extensions/flash-ext-view/docs/migration-from-legacy-view.md diff --git a/.ai/mcp/mcp.json b/.ai/mcp/mcp.json new file mode 100644 index 0000000..e69de29 diff --git a/.idea/misc.xml b/.idea/misc.xml index 64a39dc..ff846ff 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -13,6 +13,11 @@ + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 6f89113..206108b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,61 +5,26 @@ + - - - + + - + + - - - - - + + - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - @@ -95,12 +60,12 @@ "assignee": "Relism" } } - { + "selectedUrlAndAccountId": { + "url": "https://github.com/Relism/Flash5.git", + "accountId": "86d8a39c-af27-4b79-8d5d-dc74375c3348" } -}]]> +} @@ -116,62 +81,62 @@ - { + "keyToString": { + "Application.(dev) flash-bench.executor": "Run", + "Application.ExternalBenchmark (1).executor": "Run", + "Application.ExternalBenchmark.executor": "Run", + "Application.Main.executor": "Run", + "Application.MainAlt.executor": "Run", + "Application.dev.relism.bench.Main.executor": "Run", + "JUnit.RequestParserTest.executor": "Run", + "JUnit.RequestParserTest.headers_caseInsensitive.executor": "Debug", + "Maven.FlashPractice [test].executor": "Run", + "Maven.flash [compile].executor": "Run", + "Maven.flash [install].executor": "Run", + "Maven.flash [test].executor": "Run", + "Maven.flash [verify].executor": "Run", + "Maven.flash-bench [clean].executor": "Run", + "Maven.flash-bench [install].executor": "Run", + "Maven.flash-bench [package].executor": "Run", + "Maven.flash-bench [validate].executor": "Run", + "Maven.flash-ext-limiter [install].executor": "Run", + "Maven.flash-ext-limiter [package].executor": "Run", + "Maven.flash-ext-view [verify].executor": "Run", + "Maven.flash-parent [clean].executor": "Run", + "Maven.flash-parent [compile].executor": "Run", + "Maven.flash-parent [deploy].executor": "Run", + "Maven.flash-parent [install].executor": "Run", + "Maven.flash-parent [package].executor": "Run", + "Maven.flash-parent [verify].executor": "Run", + "Maven.flash-web-bundler [test].executor": "Run", + "ModuleVcsDetector.initialDetectionPerformed": "true", + "RunOnceActivity.MCP Project settings loaded": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", + "RunOnceActivity.git.unshallow": "true", + "RunOnceActivity.typescript.service.memoryLimit.init": "true", + "SHARE_PROJECT_CONFIGURATION_FILES": "true", + "codeWithMe.voiceChat.enabledByDefault": "false", + "git-widget-placeholder": "master", + "ignore.virus.scanning.warn.message": "true", + "kotlin-language-version-configured": "true", + "last_opened_file_path": "C:/Users/elorc/Documents/Coding/Java/practice/Flash", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "npm.build.executor": "Run", + "onboarding.tips.debug.path": "C:/Users/elorc/Documents/Coding/Java/practice/FlashPractice/flash-bench/src/main/java/dev/relism/Main.java", + "project.structure.last.edited": "Modules", + "project.structure.proportion": "0.15", + "project.structure.side.proportion": "0.1150748", + "settings.editor.selected.configurable": "project.propVCSSupport.DirectoryMappings", + "ts.external.directory.path": "C:\\Users\\elorc\\Documents\\Coding\\Java\\practice\\Flash\\nuxt-shadcn-dashboard\\node_modules\\typescript\\lib", + "vue.rearranger.settings.migration": "true" } -}]]> +} @@ -299,6 +264,8 @@ + +