Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/fury-adapter-apib-serializer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Fury API Blueprint Serializer

## Master

### Bug Fixes

- Prevents an exception from being thrown when serializing href variables which
do not include a value.
[#357](https://github.com/apiaryio/api-elements.js/issues/357)

## 0.12.1 (2019-07-12)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/fury-adapter-apib-serializer/template.nunjucks
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ FORMAT: 1A

{% for item in hrefVariables.content %}
{% set typeAttributes = item.attributes.get('typeAttributes') %}
+ {{ item.key.toValue() }}{% if item.value.toValue() %}: {{ item.value.toValue() }}{% endif %}{% if typeAttributes %} ({{ typeAttributes.toValue() }}){% endif %}{% if item.description and item.description.toValue() %} - {{ item.description.toValue() }}{% endif %}{% endfor %}
+ {{ item.key.toValue() }}{% if item.value and item.value.toValue() %}: {{ item.value.toValue() }}{% endif %}{% if typeAttributes %} ({{ typeAttributes.toValue() }}){% endif %}{% if item.description and item.description.toValue() %} - {{ item.description.toValue() }}{% endif %}{% endfor %}

{% endmacro %}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FORMAT: 1A

# API Documentation

### /{?example}

+ Parameters

+ example
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"element": "parseResult",
"content": [
{
"element": "category",
"meta": {
"classes": {
"element": "array",
"content": [
{
"element": "string",
"content": "api"
}
]
}
},
"content": [
{
"element": "resource",
"attributes": {
"href": {
"element": "string",
"content": "/{?example}"
},
"hrefVariables": {
"element": "hrefVariables",
"content": [
{
"element": "member",
"content": {
"key": {
"element": "string",
"content": "example"
}
}
}
]
}
}
}
]
}
]
}