Highlighted
Member
Posts: 109
Registered: ‎09-27-2013
Kudos: 71
Solutions: 6

API parameters (Blueprint)

I am using ApiMatic to generate C# code from the blueprint - getting a couple errors:

 

 

  • Endpoint SchedulingJobs_GET has a parameter named clientId, which is of an undefined type number | string.
  • Endpoint SchedulingJobs_GET has a parameter named assignedUserId, which is of an undefined type number | string.
  • Endpoint SchedulingJobs_GET has a parameter named ticketId, which is of an undefined type number | string.
  • Endpoint TicketingTickets_GET has a parameter named clientId, which is of an undefined type number | string.
  • Endpoint TicketingTickets_GET has a parameter named assignedUserId, which is of an undefined type number | string.
  • Endpoint TicketingTickets_GET has a parameter named assignedGroupId, which is of an undefined type number | string.

parameters using a type named "number | string" which is not a valid primitive API Blueprint type as per https://apiblueprint.org/documentation/mson/specification.html#211-primitive-types.

Any non-primitive types needs to be defined under the Data Structures (https://apiblueprint.org/documentation/specification.html#def-data-structures) section

 

To get it working, I replaced type "number | string" with "string" and moved the previous type information to the parameter description instead

 

HTH

Oskar