Age | Commit message (Collapse) | Author |
|
This is meant to spare clients from having to percent-encode
room aliases, v3 event ids etc. that happen to hit the endpoint path.
It is unfair to expect clients to do that since they are not supposed
to care about the shape of CS API, which parameter should be encoded
in which way. The trick (together with the slightly updated GTAD
configuration) is to percent-encode parts that happen to be QStrings
and not `const char[]`'s while passing all constant parts as plain
C character literals. This also allows to make it more certain that
the path is correctly encoded by passing and storing QByteArray's
wherever the path is already encoded, and only use QStrings (next to
const char arrays) before that.
Since the change alters the API contract (even if that contract was
crappy), some crude detection of percent-encoded stuff on input is
inserted; if input is already percent-encoded, a warning is put to
the logs, alerting developers about the change.
|
|
|
|
It's about to be deprecated in the next commits.
|
|
|
|
|
|
|
|
|
|
An SPDX comment in the source code did not collapse entirely.
|
|
Among things affecting Quotient, the update involved moving API files
from api/ to data/api/, adding extensions to event schema files, and
switching from ReStructured Text to Markdown as a lightweight markup
language. This commit updates the build system and GTAD configuration
to accommodate for these.
The build system is also more robust now in choosing whether the
update-api target should be provided. Previously the target was provided
whenever GTAD_PATH and MATRIX_DOC_PATH were specified, even if they
did not point to anything valid. CMake now checks that MATRIX_DOC_PATH
is an actual directory and that GTAD_PATH points to an actual file.
# Conflicts:
# CMakeLists.txt
|
|
After going through all the files and the history of commits on them
it was clear that some copyright statements are obsolete (the code has
been overwritten since) and some are missing. This commit tries best to
remedy that, along with adding SPDX tags where they were still not used.
Also, a minimal SPDX convention is documented for further contributions.
Closes #426.
|
|
|
|
The Quotient:: workaround seems no more necessary.
|
|
|
|
- The generated code is updated to be compatible with the BaseJob
changes introduced in the previous commit. This includes greatly
reducing the number of header files that have to be explicitly
#included, as basejob.h now #includes converters.h. Also, thanks to
the changes in BaseJob, none of generated job classes needs
a pimpl Private class.
- gtad/template.*.mustache files are replaced with data.h.mustache for
data structures (entirely defined in header files from now on) and
operation.*.mustache for API operations (also massively moved to
header files, possibly also becoming header-only in the future).
- New variable-dropping and title-overring features in GTAD 0.7 allow
to use the upstream matrix-doc repo to generate the code.
- CMakeLists.txt makes use of file globbing with CONFIGURE_DEPENDS
where possible to alleviate build reconfiguration after a GTAD call.
|
|
All GTAD-related files (gtad.yaml and templates) from now live in their
dedicated gtad/ directory - this helps against removing them
accidentally along with the rest of the generated files. The format
to list generated files in gtad.yaml has changed a bit before
GTAD 0.7 beta2; gtad.yaml in this commit conforms to the new structure.
|