An unfinished system to manage all your paper documentation in an easy way.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

openapi.json 22KB

5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
5 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. {
  2. "openapi": "3.0.2",
  3. "info": {
  4. "title": "AutoDoc API",
  5. "description": "API description of AutoDoc",
  6. "version": "1.0"
  7. },
  8. "servers": [
  9. {
  10. "url": "https://autodoc.home.spale.com/v1",
  11. "description": "Gloor AutoDoc Server"
  12. }
  13. ],
  14. "tags": [
  15. {
  16. "name": "Create",
  17. "description": "Create new documents/pages"
  18. },
  19. {
  20. "name": "Images",
  21. "description": "Get documents/pages images/thumbnails"
  22. },
  23. {
  24. "name": "Objects",
  25. "description": "Retrieve a document/page meta data"
  26. },
  27. {
  28. "name": "Properties",
  29. "description": "Manipulate properties"
  30. }
  31. ],
  32. "components": {
  33. "schemas": {
  34. "page": {
  35. "description": "page object",
  36. "type": "object",
  37. "properties": {
  38. "id": {
  39. "readOnly": true,
  40. "type": "integer",
  41. "minimum": 0,
  42. "maximum": 18446744073709551615
  43. },
  44. "documentId": {
  45. "readOnly": true,
  46. "description": "Link to Document",
  47. "type": "integer",
  48. "minimum": 0,
  49. "maximum": 18446744073709551615
  50. },
  51. "name": {
  52. "readOnly": false,
  53. "description": "Document name, may be empty",
  54. "type": "string"
  55. },
  56. "created": {
  57. "readOnly": true,
  58. "type": "integer",
  59. "minimum": 0,
  60. "maximum": 18446744073709551615
  61. },
  62. "owner": {
  63. "readOnly": true,
  64. "description": "Username of document owner",
  65. "type": "string"
  66. },
  67. "status": {
  68. "readOnly": true,
  69. "description": "Status of document",
  70. "type": "string",
  71. "enum": [
  72. "nodata",
  73. "inprogress",
  74. "deleted",
  75. "ok"
  76. ]
  77. },
  78. "languages": {
  79. "readOnly": true,
  80. "description": "Languages in document in order of importance",
  81. "type": "array",
  82. "items": {
  83. "type": "string",
  84. "enum": [
  85. "en",
  86. "de",
  87. "it",
  88. "fr"
  89. ]
  90. }
  91. }
  92. }
  93. },
  94. "document": {
  95. "description": "Document object",
  96. "type": "object",
  97. "properties": {
  98. "id": {
  99. "readOnly": true,
  100. "type": "integer",
  101. "minimum": 0,
  102. "maximum": 18446744073709551615
  103. },
  104. "pageId": {
  105. "readOnly": true,
  106. "description": "Link to PageIds",
  107. "type": "array",
  108. "items": {
  109. "type": "integer",
  110. "minimum": 0,
  111. "maximum": 18446744073709551615
  112. }
  113. },
  114. "primaryPage": {
  115. "readOnly": true,
  116. "description": "Which page is the default page",
  117. "type": "string"
  118. },
  119. "name": {
  120. "readOnly": false,
  121. "description": "Document name, may be empty",
  122. "type": "string"
  123. },
  124. "created": {
  125. "readOnly": true,
  126. "type": "integer",
  127. "minimum": 0,
  128. "maximum": 18446744073709551615
  129. },
  130. "owner": {
  131. "readOnly": true,
  132. "description": "Username of document owner",
  133. "type": "string"
  134. },
  135. "status": {
  136. "readOnly": true,
  137. "description": "Status of document",
  138. "type": "string",
  139. "enum": [
  140. "nodata",
  141. "inprogress",
  142. "deleted",
  143. "ok"
  144. ]
  145. },
  146. "languages": {
  147. "readOnly": true,
  148. "description": "Languages in document in order of importance",
  149. "type": "array",
  150. "items": {
  151. "type": "string",
  152. "enum": [
  153. "en",
  154. "de",
  155. "it",
  156. "fr"
  157. ]
  158. }
  159. },
  160. "tags": {
  161. "readOnly": true,
  162. "description": "List of all tags",
  163. "type": "array",
  164. "items": {
  165. "type": "string"
  166. }
  167. }
  168. }
  169. },
  170. "tags": {
  171. "description": "Tag object",
  172. "type": "object",
  173. "properties": {
  174. "id": {
  175. "type": "string"
  176. },
  177. "name": {
  178. "type": "string"
  179. },
  180. "color": {
  181. "type": "string"
  182. }
  183. }
  184. },
  185. "tagslist": {
  186. "description": "array of tag objects",
  187. "type": "array",
  188. "items": {
  189. "$ref": "#/components/schemas/tags"
  190. }
  191. }
  192. },
  193. "parameters": {},
  194. "securitySchemes": {
  195. "basicAuth": {
  196. "type": "http",
  197. "scheme": "basic"
  198. }
  199. }
  200. },
  201. "security": [
  202. {
  203. "basicAuth": []
  204. }
  205. ],
  206. "paths": {
  207. "/tags": {
  208. "get": {
  209. "description": "Get tags list",
  210. "responses": {
  211. "200": {
  212. "description": "OK",
  213. "content": {
  214. "application/json": {
  215. "schema": {
  216. "$ref": "#/components/schemas/tagslist"
  217. }
  218. }
  219. }
  220. }
  221. }
  222. },
  223. "post": {
  224. "description": "Create a new tag",
  225. "parameters": [
  226. {
  227. "name": "tagName",
  228. "in": "query",
  229. "required": true,
  230. "schema": {
  231. "type": "string"
  232. }
  233. },
  234. {
  235. "name": "tagColor",
  236. "in": "query",
  237. "required": true,
  238. "schema": {
  239. "type": "string"
  240. }
  241. }
  242. ],
  243. "responses": {
  244. "200": {
  245. "description": "OK"
  246. }
  247. }
  248. }
  249. },
  250. "/tags/{tagId}": {
  251. "patch": {
  252. "description": "Update a tag",
  253. "parameters": [
  254. {
  255. "name": "tagId",
  256. "in": "path",
  257. "required": true,
  258. "schema": {
  259. "type": "string"
  260. }
  261. }
  262. ],
  263. "responses": {
  264. "200": {
  265. "description": "OK"
  266. }
  267. }
  268. },
  269. "delete": {
  270. "description": "Delete a tag",
  271. "parameters": [
  272. {
  273. "name": "tagId",
  274. "in": "path",
  275. "required": true,
  276. "schema": {
  277. "type": "string"
  278. }
  279. }
  280. ],
  281. "responses": {
  282. "200": {
  283. "description": "OK"
  284. }
  285. }
  286. }
  287. },
  288. "/documents": {
  289. "post": {
  290. "summary": "Create a new document",
  291. "tags": [
  292. "Create"
  293. ],
  294. "responses": {
  295. "200": {
  296. "description": "OK",
  297. "content": {
  298. "application/json": {
  299. "schema": {
  300. "$ref": "#/components/schemas/document"
  301. }
  302. }
  303. }
  304. }
  305. }
  306. },
  307. "get": {
  308. "summary": "Returns a list of documents",
  309. "tags": [
  310. "Objects"
  311. ],
  312. "parameters": [
  313. {
  314. "in": "query",
  315. "name": "pageSize",
  316. "schema": {
  317. "type": "integer",
  318. "minimum": 0,
  319. "maximum": 1000,
  320. "default": 50
  321. }
  322. },
  323. {
  324. "in": "query",
  325. "name": "pageIndex",
  326. "schema": {
  327. "type": "integer",
  328. "minimum": 0,
  329. "maximum": 65535,
  330. "default": 0
  331. }
  332. },
  333. {
  334. "in": "query",
  335. "name": "filterLanguage",
  336. "schema": {
  337. "type": "array",
  338. "items": {
  339. "type": "string",
  340. "enum": [
  341. "fr",
  342. "de",
  343. "it",
  344. "en"
  345. ]
  346. }
  347. }
  348. },
  349. {
  350. "in": "query",
  351. "name": "filterKeyword",
  352. "schema": {
  353. "type": "array",
  354. "items": {
  355. "type": "string"
  356. }
  357. }
  358. },
  359. {
  360. "in": "query",
  361. "name": "filterTag",
  362. "schema": {
  363. "type": "array",
  364. "items": {
  365. "type": "string"
  366. }
  367. }
  368. }
  369. ],
  370. "responses": {
  371. "200": {
  372. "description": "OK",
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "type": "array",
  377. "items": {
  378. "$ref": "#/components/schemas/document"
  379. }
  380. }
  381. }
  382. }
  383. }
  384. }
  385. }
  386. },
  387. "/documents/{documentId}": {
  388. "patch": {
  389. "summary": "Manipulate document properties",
  390. "tags": [
  391. "Properties"
  392. ],
  393. "parameters": [
  394. {
  395. "in": "path",
  396. "name": "documentId",
  397. "required": true,
  398. "schema": {
  399. "type": "integer",
  400. "minimum": 0,
  401. "maximum": 18446744073709551615
  402. }
  403. },
  404. {
  405. "in": "query",
  406. "name": "addTags",
  407. "required": false,
  408. "schema": {
  409. "type": "array",
  410. "maxItems": 64,
  411. "items": {
  412. "type": "string",
  413. "minLength": 1,
  414. "maxLength": 64
  415. }
  416. }
  417. },
  418. {
  419. "in": "query",
  420. "name": "deleteTags",
  421. "required": false,
  422. "schema": {
  423. "type": "array",
  424. "maxItems": 64,
  425. "items": {
  426. "type": "string",
  427. "minLength": 1,
  428. "maxLength": 64
  429. }
  430. }
  431. },
  432. {
  433. "in": "query",
  434. "name": "name",
  435. "required": false,
  436. "schema": {
  437. "type": "string"
  438. }
  439. }
  440. ],
  441. "responses": {
  442. "200": {
  443. "description": "OK"
  444. }
  445. }
  446. },
  447. "get": {
  448. "summary": "retrieve a document meta data",
  449. "tags": [
  450. "Objects"
  451. ],
  452. "parameters": [
  453. {
  454. "in": "path",
  455. "name": "documentId",
  456. "required": true,
  457. "schema": {
  458. "type": "integer",
  459. "minimum": 0,
  460. "maximum": 18446744073709551615
  461. }
  462. }
  463. ],
  464. "responses": {
  465. "200": {
  466. "description": "OK",
  467. "content": {
  468. "application/json": {
  469. "schema": {
  470. "$ref": "#/components/schemas/document"
  471. }
  472. }
  473. }
  474. },
  475. "404": {
  476. "description": "Document not found"
  477. }
  478. }
  479. }
  480. },
  481. "/documents/{documentId}/image": {
  482. "get": {
  483. "summary": "Get an image or thumbnail of the document",
  484. "tags": [
  485. "Images"
  486. ],
  487. "parameters": [
  488. {
  489. "in": "path",
  490. "name": "documentId",
  491. "required": true,
  492. "schema": {
  493. "type": "integer",
  494. "minimum": 0,
  495. "maximum": 18446744073709551615
  496. }
  497. },
  498. {
  499. "in": "query",
  500. "name": "maxWidth",
  501. "schema": {
  502. "type": "integer",
  503. "minimum": 1,
  504. "maximum": 10000
  505. }
  506. },
  507. {
  508. "in": "query",
  509. "name": "maxHeight",
  510. "schema": {
  511. "type": "integer",
  512. "minimum": 1,
  513. "maximum": 10000
  514. }
  515. }
  516. ],
  517. "responses": {
  518. "200": {
  519. "description": "OK",
  520. "content": {
  521. "image/*": {
  522. "schema": {
  523. "type": "string",
  524. "format": "binary"
  525. }
  526. }
  527. }
  528. }
  529. }
  530. }
  531. },
  532. "/documents/{documentId}/data": {
  533. "post": {
  534. "summary": "Add one (or multiple if PDF) page to the document",
  535. "tags": [
  536. "Create"
  537. ],
  538. "parameters": [
  539. {
  540. "in": "path",
  541. "name": "documentId",
  542. "required": true,
  543. "schema": {
  544. "type": "integer",
  545. "minimum": 0,
  546. "maximum": 18446744073709551615
  547. }
  548. }
  549. ],
  550. "requestBody": {
  551. "content": {
  552. "image/png": {
  553. "schema": {
  554. "type": "string",
  555. "format": "binary"
  556. }
  557. },
  558. "image/jpeg": {
  559. "schema": {
  560. "type": "string",
  561. "format": "binary"
  562. }
  563. },
  564. "application/pdf": {
  565. "schema": {
  566. "type": "string",
  567. "format": "binary"
  568. }
  569. }
  570. }
  571. },
  572. "responses": {
  573. "200": {
  574. "description": "OK"
  575. }
  576. }
  577. }
  578. },
  579. "/pages/{pageId}": {
  580. "get": {
  581. "summary": "Get page properties",
  582. "tags": [
  583. "Objects"
  584. ],
  585. "parameters": [
  586. {
  587. "in": "path",
  588. "name": "pageId",
  589. "required": true,
  590. "schema": {
  591. "type": "integer",
  592. "minimum": 0,
  593. "maximum": 18446744073709551615
  594. }
  595. }
  596. ],
  597. "responses": {
  598. "200": {
  599. "description": "OK",
  600. "content": {
  601. "application/json": {
  602. "schema": {
  603. "$ref": "#/components/schemas/page"
  604. }
  605. }
  606. }
  607. }
  608. }
  609. }
  610. },
  611. "/pages/{pageId}/image": {
  612. "get": {
  613. "summary": "get an image or thumbnail of the page",
  614. "tags": [
  615. "Images"
  616. ],
  617. "parameters": [
  618. {
  619. "in": "path",
  620. "name": "pageId",
  621. "required": true,
  622. "schema": {
  623. "type": "integer",
  624. "minimum": 0,
  625. "maximum": 18446744073709551615
  626. }
  627. },
  628. {
  629. "in": "query",
  630. "name": "maxWidth",
  631. "schema": {
  632. "type": "integer",
  633. "minimum": 1,
  634. "maximum": 10000
  635. }
  636. },
  637. {
  638. "in": "query",
  639. "name": "maxHeight",
  640. "schema": {
  641. "type": "integer",
  642. "minimum": 1,
  643. "maximum": 10000
  644. }
  645. }
  646. ],
  647. "responses": {
  648. "200": {
  649. "description": "OK",
  650. "content": {
  651. "image/*": {
  652. "schema": {
  653. "type": "string",
  654. "format": "binary"
  655. }
  656. }
  657. }
  658. }
  659. }
  660. }
  661. }
  662. }
  663. }