-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
refract.py/refract/contrib/apielements.py
Line 19 in 3a5513d
| def has_class(class_name): |
I'm experiencing this:
In []: type(element)
Out[]: refract.contrib.apielements.Category
In []: element.classes
Out[]: <Array content=[<String content='api'>]>
In []: "api" in element.classes
Out[]: False
Which I think makes apielements.has_class fail, and, in turn, ParseResult.api, and friends.
test.apib:
FORMAT: 1A9
# Test
Drafter (v4.0.0-pre.2) generates the following, which, when deserialised results in the above behaviour.
{
"element": "parseResult",
"content": [
{
"element": "category",
"meta": {
"classes": {
"element": "array",
"content": [
{
"element": "string",
"content": "api"
}
]
},
"title": {
"element": "string",
"content": "Test"
}
},
"attributes": {
"metadata": {
"element": "array",
"content": [
{
"element": "member",
"meta": {
"classes": {
"element": "array",
"content": [
{
"element": "string",
"content": "user"
}
]
}
},
"content": {
"key": {
"element": "string",
"content": "FORMAT"
},
"value": {
"element": "string",
"content": "1A9"
}
}
}
]
}
},
"content": []
}
]
}Metadata
Metadata
Assignees
Labels
No labels