aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-06-03 17:12:35 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-06-03 17:12:35 +0900
commit38440a724acf8836e74e5bca29105e493f36eb7c (patch)
tree6c05bb4b413ee5ab72716a77b1128d2f2f8e3b38 /lib/csapi
parent8a8c645f2a2dc91e9d956b7dee8ef5cf741541f4 (diff)
downloadlibquotient-38440a724acf8836e74e5bca29105e493f36eb7c.tar.gz
libquotient-38440a724acf8836e74e5bca29105e493f36eb7c.zip
csapi + converters: Support variant types (using QVariant)
This mandated some rearrangement of toJson() overloads and FromJson<> specializations for QVariant* types - instead of variant_converters.h they are now in converters.cpp.
Diffstat (limited to 'lib/csapi')
-rw-r--r--lib/csapi/gtad.yaml9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/csapi/gtad.yaml b/lib/csapi/gtad.yaml
index e3afd473..fada9c83 100644
--- a/lib/csapi/gtad.yaml
+++ b/lib/csapi/gtad.yaml
@@ -50,7 +50,7 @@ analyzer:
type: QDateTime
initializer: QDateTime::fromString("{{defaultValue}}")
imports: <QtCore/QDateTime>
- - //:
+ - //: &QString
type: QString
initializer: QStringLiteral("{{defaultValue}}")
isString:
@@ -68,7 +68,7 @@ analyzer:
- /event.yaml$/:
{ type: EventPtr, imports: '"events/event.h"' }
- /m\.room\.member$/: pass # This $ref is only used in an array, see below
- - //: # Apply "avoidCopy" to all other ref'ed types
+ - //: *UseOmittable # Also apply "avoidCopy" to all other ref'ed types
- array:
- string: { type: QStringList, imports: <QtCore/QStringList> }
- +set: { moveOnly: }
@@ -96,9 +96,10 @@ analyzer:
imports: <QtCore/QHash>
- //:
type: QVariantHash
- imports: '"variant_converters.h"'
+ imports: <QtCore/QVariant>
- variant: # A sequence `type` (multitype) in OpenAPI
- { type: QVariant, imports: '"variant_converters.h"' }
+ - "string|null": *QString
+ - //: { type: QVariant, imports: <QtCore/QVariant> }
- schema: # Properties of inline structure definitions
*UseOmittable