Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-12188

api_specs Liquid method is not working as expected and fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • SaaS
    • System
    • False
    • Hide

      None

      Show
      None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Important

      Current behaviour

      When trying to reference the first or a specific ActiveDocs object using the api_specs method an error is rendered: {}No API definition provided.

      An example Liquid tag would be: {% assign spec = provider.api_specs.<spec_system_name> %} it fails with .first as well. Bizarrely .last is working.

      Expected behaviour

      When trying to reference an ActiveDoc object using either .first, .system_name or .last the spec should be rendered successfully when it is in a published state.

       

      Current workaround

      • Copy the desired Swagger specification content and create a new ActiveDocs object with this copied content. Give it a different name.
      • Publish the newly created ActiveDocs object.
      • Edit the "Documentation" page in the CMS with the following change:
      {% comment %}
      {% assign spec = provider.api_specs.system_name %}
      {% endcomment %}
      
      {% assign spec = provider.api_specs.last %} 

      There are various approaches to specifying a spec in Liquid and JS so each case needs to be resolved uniquely.

              Unassigned Unassigned
              rhn-support-keprice Kevin Price
              Daria Mayorova Daria Mayorova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: