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.