mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
openapi: group endpoints by tag in file
This reduces the amount of files generated by arround 300 and makes for quicker compilation times.
This commit is contained in:
parent
54235f298e
commit
03bc3f795a
1262 changed files with 7949 additions and 105833 deletions
|
@ -1,29 +1,31 @@
|
|||
{{#if endpoint.hasSuccessResponse}}
|
||||
|
||||
using namespace {{dtoNamespace}};
|
||||
|
||||
{{className}}Loader::{{className}}Loader(ApiClient *apiClient)
|
||||
: {{supportNamespace}}::HttpLoader<{{endpoint.resultType}}, {{endpoint.parameterType}}>(apiClient) {}
|
||||
{{#each endpoints as |e|}}
|
||||
{{#if e.endpoint.hasSuccessResponse}}
|
||||
|
||||
QString {{className}}Loader::path(const {{endpoint.parameterType}} ¶ms) const {
|
||||
{{e.className}}Loader::{{e.className}}Loader(ApiClient *apiClient)
|
||||
: {{supportNamespace}}::HttpLoader<{{e.endpoint.resultType}}, {{e.endpoint.parameterType}}>(apiClient) {}
|
||||
|
||||
QString {{e.className}}Loader::path(const {{e.endpoint.parameterType}} ¶ms) const {
|
||||
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
||||
|
||||
return {{pathStringInterpolation "params"}};
|
||||
return {{e.pathStringInterpolation "params"}};
|
||||
}
|
||||
|
||||
QUrlQuery {{className}}Loader::query(const {{endpoint.parameterType}} ¶ms) const {
|
||||
QUrlQuery {{e.className}}Loader::query(const {{e.endpoint.parameterType}} ¶ms) const {
|
||||
Q_UNUSED(params) // Might be overzealous, but I don't like theses kind of warnings
|
||||
|
||||
QUrlQuery result;
|
||||
|
||||
{{#each endpoint.requiredQueryParameters as |p|}}
|
||||
{{#each e.endpoint.requiredQueryParameters as |p|}}
|
||||
result.addQueryItem("{{p.name}}", Support::toString<{{p.type.typeNameWithQualifiers}}>(params.{{p.type.name}}()));
|
||||
|
||||
{{/each}}
|
||||
|
||||
// Optional parameters
|
||||
|
||||
{{#each endpoint.optionalQueryParameters as |p|}}
|
||||
{{#each e.endpoint.optionalQueryParameters as |p|}}
|
||||
if (!params.{{p.type.name}}Null()) {
|
||||
result.addQueryItem("{{p.name}}", Support::toString<{{p.type.typeNameWithQualifiers}}>(params.{{p.type.name}}()));
|
||||
}
|
||||
|
@ -34,3 +36,4 @@ QUrlQuery {{className}}Loader::query(const {{endpoint.parameterType}} ¶ms) c
|
|||
}
|
||||
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue