Newer
Older
// Code generated by go-swagger; DO NOT EDIT.
package restapi
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"encoding/json"
)
var (
// SwaggerJSON embedded version of the swagger document used at generation time
SwaggerJSON json.RawMessage
// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
FlatSwaggerJSON json.RawMessage
)
func init() {
SwaggerJSON = json.RawMessage([]byte(`{
"consumes": [
"application/io.orus.rednerd.v1+json",
"application/json"
],
"produces": [
"application/io.orus.rednerd.v1+json"
],
"schemes": [
"http",
"https"
],
"swagger": "2.0",
"info": {
"description": "The Rednerd rendering server. For a list of available rendering engines\nand their options, see \u003ca href=\"/docs/engines\"\u003eRednerd Engines\u003c/a\u003e.\n",
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
},
"basePath": "/api",
"paths": {
"/v1/auth/authenticate": {
"post": {
"security": [],
"tags": [
"auth"
],
"operationId": "authenticate",
"parameters": [
{
"name": "credentials",
"in": "body",
"schema": {
"$ref": "#/definitions/credentials"
}
}
],
"responses": {
"200": {
"description": "A Json Web Token with a 5 minutes validity",
"schema": {
"type": "string"
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
}
},
"/v1/auth/refresh_token": {
"post": {
"tags": [
"auth"
],
"operationId": "refresh-token",
"responses": {
"200": {
"description": "A Json Web Token with a 5 minutes validity",
"schema": {
"type": "string"
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
}
},
"/v1/auth/userinfo": {
"get": {
"tags": [
"auth"
],
"operationId": "userinfo",
"responses": {
"200": {
"description": "Returns the user information",
"schema": {
"$ref": "#/definitions/userinfo"
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
}
"description": "Render a template.\n\nIf provided, the template can be a complete definition (without a \"account\"\nand a \"name\"), or only a \"account\" and a \"name\" corresponding to a template\npreviously created with the template management API. In both case the\ndata must be provided.\n\nAlternatively, a single document can be provided that will be renderer into\nanother type, without processing any template. In this case the \"data\" must\nnot be provided.\n",
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
"parameters": [
{
"name": "request",
"in": "body",
"schema": {
"$ref": "#/definitions/render-request"
}
}
],
"responses": {
"200": {
"description": "The rendered documents",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/document"
}
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
}
},
"/v1/template": {
"get": {
"tags": [
"template-management"
],
"operationId": "template-list",
"responses": {
"200": {
"description": "List the user templates and the shared templates it has access to\n",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/template"
}
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
}
},
"get": {
"tags": [
"template-management"
],
"operationId": "account-template-list",
"responses": {
"200": {
"description": "List the user templates and the shared templates it has access to\n",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/template"
}
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"post": {
"tags": [
"template-management"
],
"operationId": "account-template-add",
"parameters": [
{
"name": "template",
"in": "body",
"schema": {
"$ref": "#/definitions/template"
}
}
],
"description": "Successfully added the new template",
"schema": {
"$ref": "#/definitions/template"
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"parameters": [
{
"type": "string",
"in": "path",
"required": true
}
]
},
"get": {
"description": "Render an existing template into a single document",
"tags": [
"rendering"
],
"operationId": "render-one",
"parameters": [
{
"type": "string",
"description": "A JSON object containing the variables to inject into the template.\n",
"name": "data",
"in": "query"
},
{
"type": "string",
"description": "The mimetype expected after a rendering.\n",
},
{
"type": "array",
"items": {
"type": "string"
},
"description": "A list of metadata in the form \"Name: Value\"\n",
"name": "meta",
"in": "query"
}
],
"responses": {
"200": {
"description": "The rendered document",
"schema": {}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"post": {
"description": "Render an existing template into a list of documents",
"tags": [
"rendering"
],
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
"parameters": [
{
"name": "request",
"in": "body",
"schema": {
"$ref": "#/definitions/render-template-request"
}
}
],
"responses": {
"200": {
"description": "The rendered documents",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/document"
}
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"parameters": [
{
"type": "string",
"in": "path",
"required": true
},
{
"type": "string",
"name": "id",
"in": "path",
"required": true
}
]
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
"/v1/template/{account}/{name}": {
"get": {
"tags": [
"template-management"
],
"operationId": "account-template-get",
"responses": {
"200": {
"description": "The requested template",
"schema": {
"$ref": "#/definitions/template"
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"put": {
"tags": [
"template-management"
],
"operationId": "account-template-update",
"parameters": [
{
"name": "template",
"in": "body",
"schema": {
"$ref": "#/definitions/template"
}
}
],
"responses": {
"200": {
"description": "Successfully updated the template",
"schema": {
"$ref": "#/definitions/template"
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"delete": {
"tags": [
"template-management"
],
"operationId": "account-template-delete",
"responses": {
"204": {
"description": "Successfully deleted the template",
"schema": {
"$ref": "#/definitions/template"
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"parameters": [
{
"type": "string",
"name": "account",
"in": "path",
"required": true
},
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
]
},
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
"/v1/user": {
"get": {
"tags": [
"user-management"
],
"operationId": "user-list",
"responses": {
"200": {
"description": "List the users\n",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/userinfo"
}
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"post": {
"tags": [
"user-management"
],
"operationId": "user-add",
"parameters": [
{
"name": "user",
"in": "body",
"schema": {
"$ref": "#/definitions/userinfo"
}
}
],
"responses": {
"201": {
"description": "The created user\n",
"schema": {
"$ref": "#/definitions/userinfo"
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
}
},
"/v1/user/{username}": {
"get": {
"tags": [
"user-management"
],
"operationId": "user-get",
"responses": {
"200": {
"description": "The user information\n",
"schema": {
"$ref": "#/definitions/userinfo"
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"404": {
"description": "the user does not exist"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"put": {
"tags": [
"user-management"
],
"operationId": "user-update",
"parameters": [
{
"name": "user",
"in": "body",
"schema": {
"$ref": "#/definitions/userinfo"
}
}
],
"responses": {
"200": {
"description": "The user information\n",
"schema": {
"$ref": "#/definitions/userinfo"
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"404": {
"description": "the user does not exist"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"delete": {
"tags": [
"user-management"
],
"operationId": "user-delete",
"responses": {
"204": {
"description": "The user was successfully deleted"
},
"401": {
"$ref": "#/responses/unauthorized"
},
"404": {
"description": "the user does not exist"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"parameters": [
{
"type": "string",
"in": "path",
"required": true
}
]
"/v1/user/{username}/apikey": {
"description": "List the user api keys. Only the 'admin' user can manipulate the API keys.",
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
"tags": [
"user-management"
],
"operationId": "user-apikey-list",
"responses": {
"200": {
"description": "The user api keys",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/apikey"
}
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"404": {
"description": "the user does not exist"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"post": {
"description": "Create a new api key for the user. Only the 'admin' user can manipulate the API keys.",
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
"tags": [
"user-management"
],
"operationId": "user-apikey-add",
"parameters": [
{
"name": "apikey",
"in": "body",
"schema": {
"$ref": "#/definitions/apikey"
}
}
],
"responses": {
"201": {
"description": "The api key was successfully created",
"schema": {
"$ref": "#/definitions/apikey"
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"404": {
"description": "the user does not exist"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"parameters": [
{
"type": "string",
"in": "path",
"required": true
}
]
},
"/v1/user/{username}/apikey/{name}": {
"description": "Remove a API key. Only the 'admin' user can manipulate the API keys.",
"tags": [
"user-management"
],
"operationId": "user-apikey-delete",
"responses": {
"204": {
"description": "The api key was successfully deleted"
},
"401": {
"$ref": "#/responses/unauthorized"
},
"404": {
"description": "the user or key does not exist"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"parameters": [
{
"type": "string",
"in": "path",
"required": true
},
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
]
},
"/v1/user/{username}/password": {
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
"post": {
"tags": [
"user-management"
],
"operationId": "user-password-set",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"password": {
"description": "The user new password",
"type": "string"
}
}
}
}
],
"responses": {
"204": {
"description": "The password was successfully set"
},
"401": {
"$ref": "#/responses/unauthorized"
},
"404": {
"description": "the user does not exist"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"delete": {
"tags": [
"user-management"
],
"operationId": "user-password-delete",
"responses": {
"204": {
"description": "The password was successfully deleted"
},
"401": {
"$ref": "#/responses/unauthorized"
},
"404": {
"description": "the user does not exist"
},
"default": {
"$ref": "#/responses/default"
}
}
},
"parameters": [
{
"type": "string",
"in": "path",
"required": true
}
]
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
},
"/v1/varlist": {
"post": {
"description": "Extract the list of variables present in the template. The list is not\nquaranteed to be accurate depending on the template language.\n",
"tags": [
"template-management"
],
"operationId": "template-varlist",
"parameters": [
{
"name": "request",
"in": "body",
"schema": {
"$ref": "#/definitions/template"
}
}
],
"responses": {
"200": {
"description": "The list of variables found in the template",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
"401": {
"$ref": "#/responses/unauthorized"
},
"default": {
"$ref": "#/responses/default"
}
}
}
"accept": {
"description": "The mimetype expected after a rendering.\n",
"type": "string"
},
"apikey": {
"description": "A user APIkey",
"type": "object",
"properties": {
"description": {
"type": "string",
"x-go-custom-tag": "db:\"description\""
},
"name": {
"type": "string",
"x-go-custom-tag": "db:\"name\""
},
"value": {
"type": "string",
"x-go-custom-tag": "db:\"value\""
}
}
},
"credentials": {
"description": "Credentials for authentication",
"type": "object",
"properties": {
"password": {
"type": "string"
},
"set-cookie": {
"description": "if true, the response will set a cookie containing the web token",
"type": "boolean"
},
"username": {
"type": "string"
}
}
},
"description": "A list of records to render a template",
"$ref": "#/definitions/record"
"description": "A final document. Can be returned by a rendering, but also send to render\nfor a type conversion without rendering a template.\n",
"type": "object",
"properties": {
"body": {
"description": "Content",
"type": "string"
},
"body-format": {
"description": "The body attribute format. Can be 'text' or 'base64'. Default 'base64'",
"type": "string"
"metadata": {
"$ref": "#/definitions/metadata"
"render-errors": {
"description": "A list of non-blocking errors that occured during rendering",
"type": "array",
"items": {
"$ref": "#/definitions/render-error"
}
},
"description": "The document mimetype",
"type": "string",
"example": "text/html"
"error": {
"description": "Generic error type",
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"description": "A template or document metadata. Some values are interpreted by the\nvarious engines. For more information about those values,\nsee \u003ca href=\"/docs/engines\"\u003eRednerd Engines\u003c/a\u003e.\n",
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"print-paper-size": "A4 landscape"
"description": "A record is a set of variables meant to be injected into a template",
"type": "object",
"additionalProperties": true
},
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
"render-error": {
"description": "An error that occured during rendering",
"type": "object",
"properties": {
"engine": {
"description": "The engine that produced the error",
"type": "string"
},
"extra": {
"description": "Extra context or data about the error, specific to the rendering engine\n",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"line": {
"description": "The line number on which the error occured",
"type": "integer"
},
"message": {
"description": "The error message",
"type": "string"
}
},
"x-isnullable": false
},
"render-request": {
"type": "object",
"properties": {
"accept": {
},
"data": {
"$ref": "#/definitions/dataset"
},
"document": {
"description": "Document to render. Incompatible with the 'template' and 'data' properties",
"$ref": "#/definitions/document"
},
"metadata": {
"$ref": "#/definitions/metadata"
},
"template": {
"$ref": "#/definitions/template"
}
}
},
"render-template-request": {
"type": "object",
"properties": {
"accept": {
},
"data": {
"$ref": "#/definitions/dataset"
},
"metadata": {
"$ref": "#/definitions/metadata"
"description": "A template definition. At rendering time, the \"body\" and \"metadata\"\nfields will be processed by the rendering engine corresponding to the\ntemplate \"language\" to produce a new document.\nIf you need to add metadata that should not be be processed, use\n\"static-metadata\"\n",
"description": "The template owner account name",
"type": "string",
"x-go-custom-tag": "db:\"account\""
},
"description": "Content",
"type": "string",
"x-go-custom-tag": "db:\"-\""
},
"body-format": {
"description": "The body attribute format. Can be 'text' or 'base64'. Default 'base64'",
"type": "string",
"x-go-custom-tag": "db:\"-\""
"description": "The json-schema that can validate the input data. Currently ignored.\n",
"additionalProperties": true,
"x-go-custom-tag": "db:\"data_schema\""
"description": "A description of the template",
"type": "string",
"x-go-custom-tag": "db:\"description\""
"description": "The templating language used. See\n\u003ca href=\"/docs/engines\"\u003eRednerd Engines\u003c/a\u003e for a list of possible\nvalues.\n",
"x-go-custom-tag": "db:\"language\"",
"example": "mustache"
"description": "The template default locale, in the i18n standard codification.\n",
"x-go-custom-tag": "db:\"locale\"",
"example": "fr_FR"
"$ref": "#/definitions/metadata"
},
"description": "The template name, must be unique in an account namespace,\nand should remain simple as it is used as a slug.\n",
"type": "string",
"x-go-custom-tag": "db:\"name\""
"description": "The mimetype of the data produced by the template. If the mimetype\nis known by any engine, it can be rendered to other types.\n",
"x-go-custom-tag": "db:\"produces\"",
"example": "text/html"
"$ref": "#/definitions/metadata"
"type": "string",
"x-go-custom-tag": "db:\"title\""
"description": "The template version. Can be any string, the consistency of version\nnumbers is the responsibility of the client.\n",
"type": "string",
"x-go-custom-tag": "db:\"version\""
"userinfo": {
"description": "Current user information",
"type": "object",
"properties": {
"type": "boolean",
"x-go-custom-tag": "db:\"is_admin\""