Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2577703
gtad.yaml
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
7 KB
Referenced Files
None
Subscribers
None
gtad.yaml
View Options
analyzer
:
subst
:
"%CLIENT_RELEASE_LABEL%"
:
r0
"%CLIENT_MAJOR_VERSION%"
:
r0
identifiers
:
signed
:
signedData
unsigned
:
unsignedData
PushRule/default
:
isDefault
default
:
defaultVersion
# getCapabilities/RoomVersionsCapability
m.upload.size
:
uploadSize
m.homeserver
:
homeserver
m.identity_server
:
identityServer
m.change_password
:
changePassword
m.room_versions
:
roomVersions
AuthenticationData/additionalProperties
:
authInfo
/^/(Location|Protocol|User)$/
:
'ThirdParty$1'
# These parameters are deprecated and unused in Quotient; so drop them
login>/user
:
""
login>/medium
:
""
login>/address
:
""
# Structure inside `types`:
# - swaggerType: <targetTypeSpec>
# OR
# - swaggerType:
# - swaggerFormat: <targetTypeSpec>
# - /swaggerFormatRegEx/: <targetTypeSpec>
# - //: <targetTypeSpec> # default, if the format doesn't mach anything above
# WHERE
# targetTypeSpec = targetType OR
# { type: targetType, imports: <filename OR [ filenames... ]>, <other attributes...> }
# swaggerType can be +set/+on pair; attributes from the map under +set
# are added to each type from the sequence under +on.
types
:
-
+set
:
&UseOmittable
useOmittable
:
omittedValue
:
'std::nullopt'
# Quotient::none in lib/util.h
+on
:
-
integer
:
-
int64
:
std::int_fast64_t
-
int32
:
std::int_fast32_t
-
//
:
int
-
number
:
-
float
:
float
-
//
:
double
-
boolean
:
bool
-
string
:
-
byte
:
&ByteStream
type
:
FileDesc
imports
:
"file-desc.hpp"
-
binary
:
*ByteStream
-
date
:
type
:
boost::date
initializer
:
boost::from_string("{{defaultValue}}")
imports
:
"boost/date_time/gregorian/gregorian_types.hpp"
-
dateTime
:
type
:
boost::ptime
initializer
:
boost::time_from_string("{{defaultValue}}")
imports
:
"boost/date_time/posix_time/posix_time_types.hpp"
-
//
:
&String
type
:
std::string
initializer
:
std::string("{{defaultValue}}")
isString
:
-
file
:
*ByteStream
-
object
:
&Json
{
type
:
JsonWrap
,
initializer
:
json
::
object()
}
-
$ref
:
-
/event.yaml$/
:
*Json
-
/timeline_batch.yaml/
:
title
:
Timeline
# type: JsonWrap
# - /state_event.yaml$/:
# { type: StateEvent, imports: "events/eventloader.h" }
# - /room_event.yaml$/:
# { type: RoomEvent, imports: "events/eventloader.h" }
-
/event.yaml$/
:
{
type
:
Event
,
imports
:
"event.hpp"
}
# - /m\.room\.member$/: void # Skip resolving; see EventsArray<> below
-
'/^(\./)?definitions/request_email_validation.yaml$/'
:
title
:
EmailValidationData
-
'/^(\./)?definitions/request_msisdn_validation.yaml$/'
:
title
:
MsisdnValidationData
-
/_filter.yaml$/
:
# Event/RoomEventFilters do NOT need Omittable<>
-
/public_rooms_response.yaml$/
:
{
_inline
:
true
}
-
'/event-schemas/schema/'
:
{
type
:
Event
,
imports
:
"event.hpp"
}
-
//
:
*UseOmittable
# Also apply "avoidCopy" to all other ref'ed types
-
schema
:
-
getTurnServer<
:
*Json
# It's used as an opaque JSON object
-
PublicRoomResponse
:
{
_inline
:
true
}
-
defineFilter>
:
&Filter
# Force folding into a structure
# type: Filter
# imports: "csapi/definitions/sync_filter.h"
# - getFilter<: *Filter
-
RoomFilter
:
# A structure inside Filter, same story as with *_filter.yaml
-
//
:
*UseOmittable
-
array
:
-
string
:
immer::array<std::string>
-
/^Notification|Result$/
:
type
:
"immer::array<{{1}}>"
# imports: "events/eventloader.h"
# - /m\.room\.member$/: # Only used in an array (see also above)
# type: "immer::array<RoomMemberEvent>"
# imports: "events/roommemberevent.h"
# - /state_event.yaml$/: StateEvents
# - /room_event.yaml$/: RoomEvents
-
/event.yaml$/
:
EventList
-
'/event-schemas/schema/'
:
EventList
-
//
:
"immer::array<{{1}}>"
-
map
:
# `additionalProperties` in OpenAPI
-
RoomState
:
type
:
"immer::map<std::string,
{{1}}>"
-
/.+/
:
"immer::map<std::string,
{{1}}>"
-
//
:
*Json
# `additionalProperties: true` in OpenAPI
# type: "immer::map<std::string, std::variant<{{#types}}{{name}}{{#_join}}, {{/_join}}{{/types}}>>"
# imports: <variant>
-
variant
:
# A sequence `type` (multitype) in OpenAPI
# - /^string,null|null,string$/:
# type: "std::variant<std::string, std::nullptr_t>"
# imports: <variant>
-
//
:
type
:
Variant
# type: "std::variant<{{#types}}{{name}}{{#_join}}, {{/_join}}{{/types}}>"
# imports: <variant>
#operations:
mustache
:
constants
:
# Syntax elements used by GTAD
# _quote: '"' # Common quote for left and right
# _leftQuote: '"'
# _rightQuote: '"'
# _joinChar: ',' # The character used by {{_join}} - not working yet
_comment
:
'//'
copyrightName
:
Kitsune Ral
copyrightEmail
:
<kitsune-ral@users.sf.net>
partials
:
_typeRenderer
:
"{{#scope}}{{scopeCamelCase}}Job::{{/scope}}{{>name}}"
omittedValue
:
'{}'
# default value to initialize omitted parameters with
initializer
:
'{{defaultValue}}'
cjoin
:
'{{#hasMore}},
{{/hasMore}}'
openOmittable
:
"{{^required?}}{{#useOmittable}}\
{{^defaultValue}}std::optional<{{/defaultValue}}\
{{/useOmittable}}{{/required?}}"
closeOmittable
:
"{{^required?}}{{#useOmittable}}\
{{^defaultValue}}>{{/defaultValue}}\
{{/useOmittable}}{{/required?}}"
maybeOmittableType
:
"{{>openOmittable}}{{dataType.name}}{{>closeOmittable}}"
qualifiedMaybeOmittableType
:
"{{>openOmittable}}{{dataType.qualifiedName}}{{>closeOmittable}}"
ref
:
""
maybeCrefType
:
"{{#avoidCopy}}const
{{/avoidCopy}}{{>maybeOmittableType}}{{>ref}}"
qualifiedMaybeCrefType
:
"{{#avoidCopy}}const
{{/avoidCopy}}{{>qualifiedMaybeOmittableType}}{{>ref}}"
maybeCrefJsonObject
:
"{{^propertyMap}}JsonWrap{{/propertyMap}}\
{{#propertyMap}}JsonWrap{{/propertyMap}}"
takeOrValue
:
"{{#propertyMap}}take{{/propertyMap}}{{^propertyMap}}value{{/propertyMap}}"
takeOrLoad
:
"{{#moveOnly}}take{{/moveOnly}}{{^moveOnly}}load{{/moveOnly}}"
initializeDefaultValue
:
"{{#defaultValue}}{{>initializer}}{{/defaultValue}}\
{{^defaultValue}}{{>omittedValue}}{{/defaultValue}}"
# No inner indents in folded values!
joinedParamDecl
:
>-
{{>maybeCrefType}} {{paramName}}
{{^required?}} = {{>initializeDefaultValue}}{{/required?}}{{>cjoin}}
joinedParamDef
:
"{{>maybeCrefType}}
{{paramName}}{{>cjoin}}"
passPathAndMaybeQuery
:
>-
std::string("{{basePathWithoutHost}}")
{{#pathParts}} + {{_}}{{/pathParts}}{{#queryParams?}},
queryTo{{camelCaseOperationId}}(
{{#queryParams}}{{paramName}}{{>cjoin}}{{/queryParams}}){{/queryParams?}}
nonInlineResponseSignature
:
|-
{{>docCommentShort}}
{{>maybeOmittableType}} {{paramName}}() const
# Doc-comment blocks. Comment indent is managed by clang-format
# (without clang-format there'd have to be a separate partial definition
# for each indent...) but we take care of line breaks to maintain
# some sanity even before clang-format
# This is for structures that don't expect a summary (e.g., JSON schema)
docCommentShort
:
|-
{{#description}}
/// {{_}}{{/description}}
# For structures with the summary, a common partial for summary is here;
# the main part is different in different places
docCommentSummary
:
|-
{{#summary}} \brief {{summary}}
*{{/summary}}
templates
:
data
:
.hpp
:
"{{>data.hpp.mustache}}"
api
:
.hpp
:
"{{>operation.hpp.mustache}}"
.cpp
:
"{{>operation.cpp.mustache}}"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 24, 12:25 PM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
100736
Default Alt Text
gtad.yaml (7 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment