3 unstable releases
0.2.0 | Apr 18, 2024 |
---|---|
0.1.1 | Apr 16, 2024 |
0.1.0 | Apr 15, 2024 |
#6 in #trustfall
99 downloads per month
32KB
769 lines
OpenAPI Trustfall Adapter
A OpenAPI Trustfall adapter for the v3.0.x spec.
NOTE: This adapter is not maintained by the Trustfall maintainers.
Spec
type RootSchemaQuery {
"""
OpenAPI doc info
"""
Info: Info!
"""
OpenAPI doc tags
"""
Tags: [Tag!]!
"""
OpenAPI doc paths
"""
Paths: [Path!]!
"""
OpenAPI doc path
path: the path to the endpoint
"""
Path(path: String!): Path
}
type Info {
title: String!
version: String!
description: String
}
type Tag {
name: String!
description: String
}
type Path {
path: String!
get: Operation
post: Operation
put: Operation
delete: Operation
patch: Operation
options: Operation
operations: [Operation!]!
}
type Operation {
summary: String
method: String!
description: String
tags: [String!]
xAmazonApigatewayIntegration: AmazonApigatewayIntegration
}
type AmazonApigatewayIntegration {
type: String!
httpMethod: String!
uri: String!
passthroughBehavior: String!
timeoutInMillis: Int
trigger: String!
arn: String
}
NOTE:
The arn
property in the AmazonApigatewayIntegration
integration type is expecting a specific format as follows:
x-amazon-apigateway-integration:
...
uri: "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/${some_service_arn}/invocations"
...
OR
x-amazon-apigateway-integration:
...
uri: "arn:aws:apigateway:${region}:lambda:path/2015-03-31/functions/${some_service_arn}/invocations"
...
It will try extract the value some_service_arn
.
Dependencies
~14MB
~318K SLoC