mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
* feat(APIGW): add AWS integration type for API Gateway REST v1
Add support for the API Gateway REST v1 AWS (non-proxy) integration type,
enabling direct service calls via VTL request/response mapping templates.
New components:
- VtlTemplateEngine: Apache Velocity engine with $input (body, json, path,
params shorthand), $util (escapeJavaScript, urlEncode, base64, parseJson),
$context, and $stageVariables
- AwsServiceRouter: parses action-based integration URIs and dispatches to
13 internal service handlers (states, dynamodb, sqs, sns, events, etc.)
Integration features:
- Content-Type negotiation for request template selection
- passthroughBehavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER)
- Request parameter mapping (method.request.* -> integration.request.*)
- Response parameter mapping with full JSONPath body extraction
- Integration response selection via selectionPattern regex matching
- VTL directives: #set, #foreach, #if/#else
Also fixes SFN timestamps to use epoch float (e.g. 1743263483.047) matching
real AWS format.
* feat(APIGW): add OpenAPI/Swagger import, models, and request validation
Add ImportRestApi (POST /restapis?mode=import) and PutRestApi
(PUT /restapis/{apiId}?mode=overwrite) supporting OpenAPI 3.0 and
Swagger 2.0 specs with x-amazon-apigateway-integration extensions.
- Parse OpenAPI specs via swagger-parser, create resources/methods/integrations
- Import components.schemas as API Gateway Models with JSON Schema
- Import x-amazon-apigateway-request-validators as RequestValidators
- Validator precedence: operation > path > API-level default
- Model CRUD endpoints (create, get, list, delete)
- Request body validation against JSON Schema (Draft 4) at execute-api layer
- Required parameter presence validation (query string, header)
- mode=merge returns 400 with clear error message
- 22 integration tests, 792 total passing
* fix(APIGW): match real AWS behavior for validators and mode=merge
- Remove path-level x-amazon-apigateway-request-validator (AWS only
supports operation-level > API-level default, verified against real AWS)
- Accept mode=merge in PutRestApi (treated as overwrite for now, since
real AWS accepts it — returning 400 was incorrect)
Verified: 31/31 compat tests against real AWS, 39/39 against Floci.
198 lines
7.1 KiB
XML
198 lines
7.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>io.github.hectorvent</groupId>
|
|
<artifactId>floci</artifactId>
|
|
<version>1.0.11</version>
|
|
<packaging>jar</packaging>
|
|
|
|
<name>Floci</name>
|
|
<description>Fast, free, open-source local AWS emulator supporting SSM, SQS, SNS, SES, S3, DynamoDB, Lambda, API Gateway, Cognito, KMS, Kinesis, Secrets Manager, CloudFormation, Step Functions, IAM, STS, ElastiCache, RDS, EventBridge, and CloudWatch</description>
|
|
|
|
<properties>
|
|
<maven.compiler.release>25</maven.compiler.release>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<quarkus.platform.version>3.32.3</quarkus.platform.version>
|
|
</properties>
|
|
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>io.quarkus.platform</groupId>
|
|
<artifactId>quarkus-bom</artifactId>
|
|
<version>${quarkus.platform.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<dependencies>
|
|
<!-- Quarkus REST (RESTEasy Reactive) -->
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-rest</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-rest-jackson</artifactId>
|
|
</dependency>
|
|
|
|
<!-- YAML config support -->
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-config-yaml</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Jackson for JSON storage serialization -->
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-databind</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.datatype</groupId>
|
|
<artifactId>jackson-datatype-jsr310</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
|
<artifactId>jackson-dataformat-cbor</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
|
<artifactId>jackson-dataformat-yaml</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Vert.x for per-container Lambda Runtime API servers -->
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-vertx</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Docker client for Lambda container lifecycle management -->
|
|
<dependency>
|
|
<groupId>com.github.docker-java</groupId>
|
|
<artifactId>docker-java-core</artifactId>
|
|
<version>3.4.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.github.docker-java</groupId>
|
|
<artifactId>docker-java-transport-httpclient5</artifactId>
|
|
<version>3.4.0</version>
|
|
</dependency>
|
|
|
|
<!-- BouncyCastle for X.509 certificate generation and PEM handling (ACM service) -->
|
|
<dependency>
|
|
<groupId>org.bouncycastle</groupId>
|
|
<artifactId>bcprov-jdk18on</artifactId>
|
|
<version>1.83</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.bouncycastle</groupId>
|
|
<artifactId>bcpkix-jdk18on</artifactId>
|
|
<version>1.83</version>
|
|
</dependency>
|
|
|
|
<!-- JSONata expression engine (Step Functions) -->
|
|
<dependency>
|
|
<groupId>com.dashjoin</groupId>
|
|
<artifactId>jsonata</artifactId>
|
|
<version>0.9.9</version>
|
|
</dependency>
|
|
|
|
<!-- Apache Velocity Template Engine (API Gateway VTL mapping templates) -->
|
|
<dependency>
|
|
<groupId>org.apache.velocity</groupId>
|
|
<artifactId>velocity-engine-core</artifactId>
|
|
<version>2.4.1</version>
|
|
</dependency>
|
|
|
|
<!-- JSON Schema validation (API Gateway request validation) -->
|
|
<dependency>
|
|
<groupId>com.networknt</groupId>
|
|
<artifactId>json-schema-validator</artifactId>
|
|
<version>1.5.8</version>
|
|
</dependency>
|
|
|
|
<!-- OpenAPI/Swagger parser (API Gateway ImportRestApi) -->
|
|
<dependency>
|
|
<groupId>io.swagger.parser.v3</groupId>
|
|
<artifactId>swagger-parser</artifactId>
|
|
<version>2.1.38</version>
|
|
</dependency>
|
|
|
|
<!-- Testing -->
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-junit5</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.quarkus</groupId>
|
|
<artifactId>quarkus-junit5-mockito</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.rest-assured</groupId>
|
|
<artifactId>rest-assured</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>io.quarkus.platform</groupId>
|
|
<artifactId>quarkus-maven-plugin</artifactId>
|
|
<version>${quarkus.platform.version}</version>
|
|
<extensions>true</extensions>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>build</goal>
|
|
<goal>generate-code</goal>
|
|
<goal>generate-code-tests</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.14.0</version>
|
|
<configuration>
|
|
<release>${maven.compiler.release}</release>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>3.5.2</version>
|
|
<configuration>
|
|
<systemPropertyVariables>
|
|
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
|
|
</systemPropertyVariables>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>native</id>
|
|
<activation>
|
|
<property>
|
|
<name>native</name>
|
|
</property>
|
|
</activation>
|
|
<properties>
|
|
<skipITs>true</skipITs>
|
|
<quarkus.native.enabled>true</quarkus.native.enabled>
|
|
<maven.compiler.release>24</maven.compiler.release>
|
|
</properties>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|