Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Custom connector somehow wrongly parses given OpenApi schema

I have worked with Application Integration service and defined custom connector using OpenApi swagger definition. Then implemented in Integration one by one those endpoints. When tried to configure connector for one POST method I noticed that the schema from OpenApi definition is different than that processed by connector
Original:

 

 

"responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },

 

 

and connectorOutputPayload for that particular method

 

 

{
  "type": "array",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "items": {
    "type": "string",
    "format": "uuid",
    "properties": {},
    "$schema": "http://json-schema.org/draft-07/schema#"
  }
}

 

 

Somehow instead of getting single uuid string it wants to get a list of them. 
Obviously that connector endpoint rises an error.
What could be the reason of wrongly parsing this part of schema?
Is it possible to somehow override connectorOutputPayload schema? (looks as it's static by design)

Current workaround is to create the REST Endpoint with manual configuration but I don't like this approach.

Przemek

0 4 120
4 REPLIES 4

Hey @Przemek_Topolsk,

We’ve seen that your question hasn’t gotten a response yet. We’ll keep checking in on this thread and encourage other members to share their thoughts.

Hi @Przemek_Topolsk,
You can try Data Transformer task to map connectorOutputPayload to a variable with expected schema.

Hi @salonijuneja 

No, unfortunately I can't access connectorOuptuPayload object after custom connector task.
Tried Data Mapping, Data Transformer end even in pure JavaScript task.
Tbh even if I create simple JavaScript that logs some string, and put this task after custom connector I can't see it in logs for that integration execution. 
So it looks as no transformation is possible after failed custom connector task. Why?

Even tried different approach to ignore the error and return some constant but still ErrorInfo object is propagated to the last task and returned as well (can't overwrite this object either).


@Przemek_Topolsk - the engineering team is looking into this. They would like the following information. If you have Google Support, can you open a ticket to provide this?  If not, please DM (Direct Message) me or @salonijuneja with this info:

  • Is the OpenAPI Spec in YAML or JSON format?
  • Could you share the content of the YAML or JSON file so we can reproduce the issue accurately?
  • For the OpenAPI Swagger specification, could you specify the version and structure of the YAML file?
  • What type of authentication is being used — OAuth or Personal Access Token (PAT)?
  • How are you providing the connector specification — via a public URL or by using custom files (JSON or YAML)?

Thanks,

Scott (@shaaland)
Application Integration Product