How can I attach external files to dev portal documentation?

I have SOAP services that will be exposed via APIgee as SOAP. I want to have the associated artifacts (WSDL, Schema) available for a consumer to obtain via their access to the DevPortal. How can I do this?

0 6 608
6 REPLIES 6

@ron , Are you using smartdocs ? Would you like to attach docs / artifacts to smartdoc pages ?

Yes - I see how I can upload files - but how can I associate files within the SmartDocs for an API?

I think for that you will need to use a custom Smartdocs template that presents the assets for the given Index or Method.

@ron ,

As you know, Apigee Developer Portal is built on top of famous open source CMS Drupal. Smartdocs pages that you see is Drupal Node, API Categories that you see is Taxonomy terms. You can add new fields to Content-Types (Smartdocs is a content-type) or taxonomy terms. You can add an upload field & attach assets & display same using Views / Blocks in Smartdocs pages. It should be straight forward.

Can either of you provide a link to some examples or a video showing how to do this? It may seem straight forward to those with the understanding and experience, but to me I would like some detailed direction or instruction.

@ron

You can add new fields to the smartdocs method. Please find steps to solve above issue.

  • Navigate to "admin/structure/types/manage/smart_method/fields" as administrator.
  • Add a New Field "File Attachments" of field type "File", Widget "File" , Click on Save, Follow Settings Page, Add Allowed Extensions, Select Number of Fields to "Unlimited", Click on Save.

2735-screen-shot-2016-05-21-at-85925-pm.png

  • Navigate to SmartDocs API Page, Click on "Edit"

2736-screen-shot-2016-05-21-at-90305-pm.png

  • Upload assets,

2737-screen-shot-2016-05-21-at-90751-pm.png

  • By Default, Above attachments are not displayed in smartdocs page. You need to create a new view block & enable same using context in smartdocs page.
    • Add a new view by navigating to "admin/structure/views/add"
    • Fill View Name
    • Show "Content Type" of "SmartDocs Method"
    • Uncheck "Create A Page", Check "Create A Block"
    • Click on Continue & Edit
    • Add a Contextual Filter from "Advanced Section"
    • Add Content: Nid
    • Choose "Provide Default Value": "Content Id From URL"
  • Remove default field , "Title" from fields list
  • Add a field "File Attachements : Smartdocs method"
  • Save View.

2738-screen-shot-2016-05-21-at-91408-pm.png

  • Create a new context by navigating to "admin/structure/context/add"
    • Choose name
    • Choose Condition "Node Type" : "SmartDocs Method"
    • Choose Reactions "Blocks" : Add view to desired page region, I have selected right side bar.
    • Save Context
    • See results in smartdocs page.

2739-smartdocs.png

See rendered view block in smartdocs page, Check screenshot here. Make changes like CSS etc to suit your needs using your custom theme.