syndesisio / syndesis-rest

The API for Syndesis - a flexible, customizable, cloud-hosted platform that provides core integration capabilities as a service. It leverages Red Hat's existing product architecture using OpenShift Online/Dedicated and Fuse Integration Services.
https://syndesis-staging.b6ff.rh-idev.openshiftapps.com/api/v1/
Apache License 2.0
6 stars 17 forks source link

Some object properties aren't being returned properly. #86

Closed gashcrumb closed 7 years ago

gashcrumb commented 7 years ago

To index into integrations properly we need an ID, however the rest API is currently returning an object for the id property. For example this URL:

https://ipaas-staging.b6ff.rh-idev.openshiftapps.com/api/v1/integrations/1

is returning:

{
  "configuration": {
    "present": true
  },
  "integrationTemplateId": {
    "present": true
  },
  "integrationTemplate": {
    "present": false
  },
  "userId": {
    "present": true
  },
  "users": [],
  "tags": [],
  "id": {
    "present": true
  },
  "name": "deserunt"
}

similarly with connections:

https://ipaas-staging.b6ff.rh-idev.openshiftapps.com/api/v1/connections/1

yeilds:

{
  "organization": {
    "present": false
  },
  "organizationId": {
    "present": true
  },
  "component": {
    "present": false
  },
  "componentId": {
    "present": true
  },
  "configuredProperties": "{\"consectetur\":{\"name\":\"consectetur\",\"title\":\"consectetur\",\"description\":\"fugiat culpa sunt occaecat adipisicing\",\"type\":\"number\",\"enabled\":true,\"required\":false},\"aliquip\":{\"name\":\"aliquip\",\"title\":\"aliquip\",\"description\":\"irure deserunt Lorem consectetur do\",\"type\":\"number\",\"enabled\":true,\"required\":false},\"ex\":{\"name\":\"ex\",\"title\":\"ex\",\"description\":\"culpa labore fugiat cillum adipisicing\",\"type\":\"number\",\"enabled\":true,\"required\":false},\"eiusmod\":{\"name\":\"eiusmod\",\"title\":\"eiusmod\",\"description\":\"consequat sit sint deserunt irure\",\"type\":\"boolean\",\"enabled\":true,\"required\":false},\"culpa\":{\"name\":\"culpa\",\"title\":\"culpa\",\"description\":\"quis velit est culpa duis\",\"type\":\"password\",\"enabled\":true,\"required\":false},\"commodo\":{\"name\":\"commodo\",\"title\":\"commodo\",\"description\":\"deserunt ipsum consequat consequat culpa\",\"type\":\"password\",\"enabled\":true,\"required\":true},\"dolore\":{\"name\":\"dolore\",\"title\":\"dolore\",\"description\":\"dolore voluptate dolor officia incididunt\",\"type\":\"boolean\",\"enabled\":true,\"required\":true},\"aute\":{\"name\":\"aute\",\"title\":\"aute\",\"description\":\"aute enim consequat eu dolore\",\"type\":\"string\",\"enabled\":true,\"required\":false}}",
  "icon": "fa-foursquare",
  "description": "sunt sunt dolore est fugiat nulla elit excepteur deserunt amet",
  "position": "Anywhere",
  "tags": [],
  "userId": {
    "present": true
  },
  "id": {
    "present": true
  },
  "name": "laboris"
}

Note also the values for organization, userId, organizationId, integrationTemplate also don't look right.

@KurtStam CC

jimmidyson commented 7 years ago

My bad... fixing.

jimmidyson commented 7 years ago

Fixed in #87, with a test, no less.