Edit in GitHubLog an issue

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.

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.

Copied to your clipboard
{
"meshConfig": {
"sources": [
{
"name": "CommerceREST",
"handler": {
"openapi": {
"source": "your_Commerce_API"
}
},
}
]
},
}

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>"
}
}
}
]
},
}

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.

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 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"
}
}
}
}
]
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.