How can I allow developers to auto-populate API params?

anton
New Member

I'd like to add a button in the SmartDocs documentation that will auto-populate the required API parameters to simplify testing of the API.

How can I do it?

5600-api-doc-auto-populate-question.png

1 2 110
2 REPLIES 2

You could specify the "default" value for those attributes in your Swagger/OpenAPI specification. Those default values will be automatically populated on the SmartDocs page. Adding a button to "auto-populate" requires customizing Developer portal code (SmartDocs template).

@Anton+Bar ,

It's easy, Just specify the default values using "default" key in openApi / swagger spec parameters definition.

5668-open-bank-api-portal-createaccountrequest.png

See example smartdocs in action here & associated OpenApi / Swagger spec here. Also, You can manually update same using content edit option in developer portal as mentioned by @sudheendra@apigee.com .

Hope it helps. Keep us posted moving forward if any.