Add source handlers
API Mesh for Adobe Developer App Builder only supports the following source handlers:
- OpenAPI
- GraphQL
- JSON schemas
- SOAP (Experimental)
Whenever a source schema is modified, you must update your mesh to allow API Mesh to cache any changes.
We will add support for additional handlers in future releases.
Only alphanumerical characters are allowed in source handler names.
OpenAPI
The OpenAPI handler allows you to connect to an OpenAPI-compliant REST service endpoint or static Swagger schemas using a .json
or .yaml
file.
When using a Swagger schema, API Mesh can only access application/json
content from the Swagger API definition. API Mesh does not accept a wildcard (*/*
) as a content type.
Copied to your clipboard{"meshConfig": {"sources": [{"name": "CommerceREST","handler": {"openapi": {"source": "your_Commerce_API"}},}]},}
For more information, see the OpenAPI Config API Reference.
GraphQL endpoints
The GraphQL handler allows you to connect to a GraphQL endpoint.
Copied to your clipboard{"meshConfig": {"sources": [{"name": "PWA","handler": {"graphql": {"endpoint": "your_Venia_url"}}},{"name": "AEM","handler": {"graphql": {"endpoint": "<your_AEM_url>"}}}]},}
For more information, see the GraphQL Config API Reference.
JSON schemas
The JSON handler allows you to load a single remote REST endpoint and define the request and response structures using pre-defined JSON schema files.
The JsonSchema
source in GraphQL Mesh uses a different capitalization scheme than other handlers. Using jsonSchema
will result in an error.
Copied to your clipboard{"meshConfig": {"sources": [{"name": "carts","handler": {"JsonSchema": {"baseUrl": "<your_Commerce_url>","operations": [{"type": "Query","field": "data","path": "/cart","method": "GET","responseSchema": "./carts-response-schema.json"}]}}}]},}
For more information, see the JSON Schema Config API Reference.
SOAP
The SOAP handler is experimental and should not be used in production deployments.
The SOAP handler allows you to consume SOAP WSDL
files and generate a remote executable schema for those services.
Copied to your clipboard{"meshConfig": {"sources": [{"name": "SoapSource","handler": {"soap": {"source": "http://<Commerce Host>/soap?wsdl&services=customerCustomerRepositoryV1","wsdl": "http://<Commerce Host>/soap?wsdl&services=customerCustomerRepositoryV1","operationHeaders": {"x-operation-header-key": "sample-x-operation-header-value"},"schemaHeaders": {"x-schema-header-key": "sample-x-schema-header-value"}}}}]}}
For more information, see the SOAP handler reference.