APIGEE Drupal based developer portal - On Enabling basic Authentication, "Value" and "schema" under requestBody getting removed.

Not applicable

We are currently working on APIGEE Drupal based developer portal. We created a YAML spec for one of our API and uploaded in smart doc section for a new model.We published the nodes"keeping the default template" .

Our spec has basic authentication configured. e,g - in YAML

schemes: - https
securityDefinitions: basicAuth: type: basic
security: - basicAuth:[]

Till the time we enable the basic authentication under - "Edit Method" ->Select the Security Scheme -> Save API, "Value" and "schema" under Request Body was getting populated for POST method.

As soon as Basic authentication is enabled, "Value" and "schema" under Request Body is getting removed. Tried Javascript console to analyze for any error, but no luck.

YAML spec is attached herewith: address-swaggeryaml.txt

0 1 256
1 REPLY 1

Not applicable

After a lot of digging and going through javascript logs , it surfaced the issue is with the below line in SAMRT doc template where handlebar variable "body" is accessed.

{{#if body}}
    Apigee.APIModel.bodyParameters={{#if body.parameters}}{{{body.parameters}}}{{else}}false{{/if}};

body.parameters should have a JSON object having property schema with proper values e.g -

Apigee.APIModel.bodyParameters=[{"schema":"{\n \"$ref\" : \"#\/definitions\/EmployeeAddressRequest\"\n}","allowMultiple":false...

but on enabling Basic authentication we ended up having

Apigee.APIModel.bodyParameters=[{"schema":null,"allowMultiple":false,...

So as schema is getting loaded with null, the schema is not getting populated.

Now Handle bar variables which are available in the smartdocs template are limited & they come from Edge API which is totally hidden to developer working on SmartDocs in developer portal.So is it related to Edge API ? we need to update any module ??