An unfinished system to manage all your paper documentation in an easy way.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

openapi.json 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  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. },
  224. "/tags/{tagId}": {
  225. "patch": {
  226. "description": "Update a tag",
  227. "parameters": [
  228. {
  229. "name": "tagId",
  230. "in": "path",
  231. "required": true,
  232. "schema": {
  233. "type": "string"
  234. }
  235. }
  236. ],
  237. "responses": {
  238. "200": {
  239. "description": "OK"
  240. }
  241. }
  242. },
  243. "delete": {
  244. "description": "Delete a tag",
  245. "parameters": [
  246. {
  247. "name": "tagId",
  248. "in": "path",
  249. "required": true,
  250. "schema": {
  251. "type": "string"
  252. }
  253. }
  254. ],
  255. "responses": {
  256. "200": {
  257. "description": "OK"
  258. }
  259. }
  260. }
  261. },
  262. "/documents": {
  263. "post": {
  264. "summary": "Create a new document",
  265. "tags": [
  266. "Create"
  267. ],
  268. "responses": {
  269. "200": {
  270. "description": "OK",
  271. "content": {
  272. "application/json": {
  273. "schema": {
  274. "$ref": "#/components/schemas/document"
  275. }
  276. }
  277. }
  278. }
  279. }
  280. },
  281. "get": {
  282. "summary": "Returns a list of documents",
  283. "tags": [
  284. "Objects"
  285. ],
  286. "parameters": [
  287. {
  288. "in": "query",
  289. "name": "pageSize",
  290. "schema": {
  291. "type": "integer",
  292. "minimum": 0,
  293. "maximum": 1000,
  294. "default": 50
  295. }
  296. },
  297. {
  298. "in": "query",
  299. "name": "pageIndex",
  300. "schema": {
  301. "type": "integer",
  302. "minimum": 0,
  303. "maximum": 65535,
  304. "default": 0
  305. }
  306. },
  307. {
  308. "in": "query",
  309. "name": "filterLanguage",
  310. "schema": {
  311. "type": "array",
  312. "items": {
  313. "type": "string",
  314. "enum": [
  315. "fr",
  316. "de",
  317. "it",
  318. "en"
  319. ]
  320. }
  321. }
  322. },
  323. {
  324. "in": "query",
  325. "name": "filterKeyword",
  326. "schema": {
  327. "type": "array",
  328. "items": {
  329. "type": "string"
  330. }
  331. }
  332. },
  333. {
  334. "in": "query",
  335. "name": "filterTag",
  336. "schema": {
  337. "type": "array",
  338. "items": {
  339. "type": "string"
  340. }
  341. }
  342. }
  343. ],
  344. "responses": {
  345. "200": {
  346. "description": "OK",
  347. "content": {
  348. "application/json": {
  349. "schema": {
  350. "type": "array",
  351. "items": {
  352. "$ref": "#/components/schemas/document"
  353. }
  354. }
  355. }
  356. }
  357. }
  358. }
  359. }
  360. },
  361. "/documents/{documentId}": {
  362. "patch": {
  363. "summary": "Manipulate document properties",
  364. "tags": [
  365. "Properties"
  366. ],
  367. "parameters": [
  368. {
  369. "in": "path",
  370. "name": "documentId",
  371. "required": true,
  372. "schema": {
  373. "type": "integer",
  374. "minimum": 0,
  375. "maximum": 18446744073709551615
  376. }
  377. },
  378. {
  379. "in": "query",
  380. "name": "addTags",
  381. "required": false,
  382. "schema": {
  383. "type": "array",
  384. "maxItems": 64,
  385. "items": {
  386. "type": "string",
  387. "minLength": 1,
  388. "maxLength": 64
  389. }
  390. }
  391. },
  392. {
  393. "in": "query",
  394. "name": "deleteTags",
  395. "required": false,
  396. "schema": {
  397. "type": "array",
  398. "maxItems": 64,
  399. "items": {
  400. "type": "string",
  401. "minLength": 1,
  402. "maxLength": 64
  403. }
  404. }
  405. },
  406. {
  407. "in": "query",
  408. "name": "name",
  409. "required": false,
  410. "schema": {
  411. "type": "string"
  412. }
  413. }
  414. ],
  415. "responses": {
  416. "200": {
  417. "description": "OK"
  418. }
  419. }
  420. },
  421. "get": {
  422. "summary": "retrieve a document meta data",
  423. "tags": [
  424. "Objects"
  425. ],
  426. "parameters": [
  427. {
  428. "in": "path",
  429. "name": "documentId",
  430. "required": true,
  431. "schema": {
  432. "type": "integer",
  433. "minimum": 0,
  434. "maximum": 18446744073709551615
  435. }
  436. }
  437. ],
  438. "responses": {
  439. "200": {
  440. "description": "OK",
  441. "content": {
  442. "application/json": {
  443. "schema": {
  444. "$ref": "#/components/schemas/document"
  445. }
  446. }
  447. }
  448. },
  449. "404": {
  450. "description": "Document not found"
  451. }
  452. }
  453. }
  454. },
  455. "/documents/{documentId}/image": {
  456. "get": {
  457. "summary": "Get an image or thumbnail of the document",
  458. "tags": [
  459. "Images"
  460. ],
  461. "parameters": [
  462. {
  463. "in": "path",
  464. "name": "documentId",
  465. "required": true,
  466. "schema": {
  467. "type": "integer",
  468. "minimum": 0,
  469. "maximum": 18446744073709551615
  470. }
  471. },
  472. {
  473. "in": "query",
  474. "name": "maxWidth",
  475. "schema": {
  476. "type": "integer",
  477. "minimum": 1,
  478. "maximum": 10000
  479. }
  480. },
  481. {
  482. "in": "query",
  483. "name": "maxHeight",
  484. "schema": {
  485. "type": "integer",
  486. "minimum": 1,
  487. "maximum": 10000
  488. }
  489. }
  490. ],
  491. "responses": {
  492. "200": {
  493. "description": "OK",
  494. "content": {
  495. "image/*": {
  496. "schema": {
  497. "type": "string",
  498. "format": "binary"
  499. }
  500. }
  501. }
  502. }
  503. }
  504. }
  505. },
  506. "/documents/{documentId}/data": {
  507. "post": {
  508. "summary": "Add one (or multiple if PDF) page to the document",
  509. "tags": [
  510. "Create"
  511. ],
  512. "parameters": [
  513. {
  514. "in": "path",
  515. "name": "documentId",
  516. "required": true,
  517. "schema": {
  518. "type": "integer",
  519. "minimum": 0,
  520. "maximum": 18446744073709551615
  521. }
  522. }
  523. ],
  524. "requestBody": {
  525. "content": {
  526. "image/png": {
  527. "schema": {
  528. "type": "string",
  529. "format": "binary"
  530. }
  531. },
  532. "image/jpeg": {
  533. "schema": {
  534. "type": "string",
  535. "format": "binary"
  536. }
  537. },
  538. "application/pdf": {
  539. "schema": {
  540. "type": "string",
  541. "format": "binary"
  542. }
  543. }
  544. }
  545. },
  546. "responses": {
  547. "200": {
  548. "description": "OK"
  549. }
  550. }
  551. }
  552. },
  553. "/pages/{pageId}": {
  554. "get": {
  555. "summary": "Get page properties",
  556. "tags": [
  557. "Objects"
  558. ],
  559. "parameters": [
  560. {
  561. "in": "path",
  562. "name": "pageId",
  563. "required": true,
  564. "schema": {
  565. "type": "integer",
  566. "minimum": 0,
  567. "maximum": 18446744073709551615
  568. }
  569. }
  570. ],
  571. "responses": {
  572. "200": {
  573. "description": "OK",
  574. "content": {
  575. "application/json": {
  576. "schema": {
  577. "$ref": "#/components/schemas/page"
  578. }
  579. }
  580. }
  581. }
  582. }
  583. }
  584. },
  585. "/pages/{pageId}/image": {
  586. "get": {
  587. "summary": "get an image or thumbnail of the page",
  588. "tags": [
  589. "Images"
  590. ],
  591. "parameters": [
  592. {
  593. "in": "path",
  594. "name": "pageId",
  595. "required": true,
  596. "schema": {
  597. "type": "integer",
  598. "minimum": 0,
  599. "maximum": 18446744073709551615
  600. }
  601. },
  602. {
  603. "in": "query",
  604. "name": "maxWidth",
  605. "schema": {
  606. "type": "integer",
  607. "minimum": 1,
  608. "maximum": 10000
  609. }
  610. },
  611. {
  612. "in": "query",
  613. "name": "maxHeight",
  614. "schema": {
  615. "type": "integer",
  616. "minimum": 1,
  617. "maximum": 10000
  618. }
  619. }
  620. ],
  621. "responses": {
  622. "200": {
  623. "description": "OK",
  624. "content": {
  625. "image/*": {
  626. "schema": {
  627. "type": "string",
  628. "format": "binary"
  629. }
  630. }
  631. }
  632. }
  633. }
  634. }
  635. }
  636. }
  637. }