swagger.json 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "title": "Homethings API",
  5. "contact": {},
  6. "version": "1.0"
  7. },
  8. "paths": {
  9. "/api/v1/auth/check": {
  10. "get": {
  11. "consumes": [
  12. "application/json"
  13. ],
  14. "produces": [
  15. "application/json"
  16. ],
  17. "tags": [
  18. "Auth"
  19. ],
  20. "summary": "Check auth",
  21. "responses": {
  22. "200": {
  23. "description": "OK",
  24. "schema": {
  25. "$ref": "#/definitions/dto.UserResponse"
  26. }
  27. },
  28. "403": {
  29. "description": "Forbidden",
  30. "schema": {
  31. "$ref": "#/definitions/dto.ErrorResponse"
  32. }
  33. },
  34. "500": {
  35. "description": "Internal Server Error",
  36. "schema": {
  37. "$ref": "#/definitions/dto.ErrorResponse"
  38. }
  39. }
  40. }
  41. }
  42. },
  43. "/api/v1/auth/login": {
  44. "post": {
  45. "consumes": [
  46. "application/json"
  47. ],
  48. "produces": [
  49. "application/json"
  50. ],
  51. "tags": [
  52. "Auth"
  53. ],
  54. "summary": "Log in user",
  55. "parameters": [
  56. {
  57. "description": "Request body",
  58. "name": "data",
  59. "in": "body",
  60. "required": true,
  61. "schema": {
  62. "$ref": "#/definitions/dto.LoginRequest"
  63. }
  64. }
  65. ],
  66. "responses": {
  67. "200": {
  68. "description": "OK",
  69. "schema": {
  70. "$ref": "#/definitions/dto.LoginResponse"
  71. }
  72. },
  73. "400": {
  74. "description": "Bad Request",
  75. "schema": {
  76. "$ref": "#/definitions/dto.ErrorResponse"
  77. }
  78. },
  79. "403": {
  80. "description": "Forbidden",
  81. "schema": {
  82. "$ref": "#/definitions/dto.ErrorResponse"
  83. }
  84. },
  85. "500": {
  86. "description": "Internal Server Error",
  87. "schema": {
  88. "$ref": "#/definitions/dto.ErrorResponse"
  89. }
  90. }
  91. }
  92. }
  93. },
  94. "/api/v1/images": {
  95. "post": {
  96. "security": [
  97. {
  98. "APIKey": []
  99. }
  100. ],
  101. "consumes": [
  102. "multipart/form-data"
  103. ],
  104. "produces": [
  105. "application/json"
  106. ],
  107. "tags": [
  108. "Images"
  109. ],
  110. "summary": "Add images",
  111. "parameters": [
  112. {
  113. "type": "integer",
  114. "description": "Place ID",
  115. "name": "place_id",
  116. "in": "formData"
  117. },
  118. {
  119. "type": "integer",
  120. "description": "Thing ID",
  121. "name": "thing_id",
  122. "in": "formData"
  123. },
  124. {
  125. "type": "array",
  126. "items": {
  127. "type": "file"
  128. },
  129. "collectionFormat": "csv",
  130. "description": "Files",
  131. "name": "files",
  132. "in": "formData",
  133. "required": true
  134. }
  135. ],
  136. "responses": {
  137. "200": {
  138. "description": "OK",
  139. "schema": {
  140. "$ref": "#/definitions/dto.EmptyResponse"
  141. }
  142. },
  143. "400": {
  144. "description": "Bad Request",
  145. "schema": {
  146. "$ref": "#/definitions/dto.ErrorResponse"
  147. }
  148. },
  149. "500": {
  150. "description": "Internal Server Error",
  151. "schema": {
  152. "$ref": "#/definitions/dto.ErrorResponse"
  153. }
  154. }
  155. }
  156. }
  157. },
  158. "/api/v1/images/place/{imageId}": {
  159. "delete": {
  160. "security": [
  161. {
  162. "APIKey": []
  163. }
  164. ],
  165. "consumes": [
  166. "application/json"
  167. ],
  168. "produces": [
  169. "application/json"
  170. ],
  171. "tags": [
  172. "Images"
  173. ],
  174. "summary": "Delete image",
  175. "parameters": [
  176. {
  177. "type": "integer",
  178. "description": "Image ID",
  179. "name": "imageId",
  180. "in": "path",
  181. "required": true
  182. }
  183. ],
  184. "responses": {
  185. "200": {
  186. "description": "OK",
  187. "schema": {
  188. "$ref": "#/definitions/dto.EmptyResponse"
  189. }
  190. },
  191. "400": {
  192. "description": "Bad Request",
  193. "schema": {
  194. "$ref": "#/definitions/dto.ErrorResponse"
  195. }
  196. },
  197. "500": {
  198. "description": "Internal Server Error",
  199. "schema": {
  200. "$ref": "#/definitions/dto.ErrorResponse"
  201. }
  202. }
  203. }
  204. }
  205. },
  206. "/api/v1/images/place/{placeId}": {
  207. "get": {
  208. "security": [
  209. {
  210. "APIKey": []
  211. }
  212. ],
  213. "consumes": [
  214. "application/json"
  215. ],
  216. "produces": [
  217. "application/json"
  218. ],
  219. "tags": [
  220. "Images"
  221. ],
  222. "summary": "Get images by place ID (with child places)",
  223. "parameters": [
  224. {
  225. "type": "integer",
  226. "description": "Place ID",
  227. "name": "placeId",
  228. "in": "path",
  229. "required": true
  230. }
  231. ],
  232. "responses": {
  233. "200": {
  234. "description": "OK",
  235. "schema": {
  236. "$ref": "#/definitions/dto.ImagesResponse"
  237. }
  238. },
  239. "400": {
  240. "description": "Bad Request",
  241. "schema": {
  242. "$ref": "#/definitions/dto.ErrorResponse"
  243. }
  244. },
  245. "500": {
  246. "description": "Internal Server Error",
  247. "schema": {
  248. "$ref": "#/definitions/dto.ErrorResponse"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "/api/v1/images/thing/{imageId}": {
  255. "delete": {
  256. "security": [
  257. {
  258. "APIKey": []
  259. }
  260. ],
  261. "consumes": [
  262. "application/json"
  263. ],
  264. "produces": [
  265. "application/json"
  266. ],
  267. "tags": [
  268. "Images"
  269. ],
  270. "summary": "Delete image",
  271. "parameters": [
  272. {
  273. "type": "integer",
  274. "description": "Image ID",
  275. "name": "imageId",
  276. "in": "path",
  277. "required": true
  278. }
  279. ],
  280. "responses": {
  281. "200": {
  282. "description": "OK",
  283. "schema": {
  284. "$ref": "#/definitions/dto.EmptyResponse"
  285. }
  286. },
  287. "400": {
  288. "description": "Bad Request",
  289. "schema": {
  290. "$ref": "#/definitions/dto.ErrorResponse"
  291. }
  292. },
  293. "500": {
  294. "description": "Internal Server Error",
  295. "schema": {
  296. "$ref": "#/definitions/dto.ErrorResponse"
  297. }
  298. }
  299. }
  300. }
  301. },
  302. "/api/v1/images/thing/{thingId}": {
  303. "get": {
  304. "security": [
  305. {
  306. "APIKey": []
  307. }
  308. ],
  309. "consumes": [
  310. "application/json"
  311. ],
  312. "produces": [
  313. "application/json"
  314. ],
  315. "tags": [
  316. "Images"
  317. ],
  318. "summary": "Get images by thing ID",
  319. "parameters": [
  320. {
  321. "type": "integer",
  322. "description": "Thing ID",
  323. "name": "thingId",
  324. "in": "path",
  325. "required": true
  326. }
  327. ],
  328. "responses": {
  329. "200": {
  330. "description": "OK",
  331. "schema": {
  332. "$ref": "#/definitions/dto.ImagesResponse"
  333. }
  334. },
  335. "400": {
  336. "description": "Bad Request",
  337. "schema": {
  338. "$ref": "#/definitions/dto.ErrorResponse"
  339. }
  340. },
  341. "500": {
  342. "description": "Internal Server Error",
  343. "schema": {
  344. "$ref": "#/definitions/dto.ErrorResponse"
  345. }
  346. }
  347. }
  348. }
  349. },
  350. "/api/v1/places": {
  351. "get": {
  352. "security": [
  353. {
  354. "APIKey": []
  355. }
  356. ],
  357. "consumes": [
  358. "application/json"
  359. ],
  360. "produces": [
  361. "application/json"
  362. ],
  363. "tags": [
  364. "Places"
  365. ],
  366. "summary": "Get places list",
  367. "responses": {
  368. "200": {
  369. "description": "OK",
  370. "schema": {
  371. "$ref": "#/definitions/dto.PlacesResponse"
  372. }
  373. },
  374. "500": {
  375. "description": "Internal Server Error",
  376. "schema": {
  377. "$ref": "#/definitions/dto.ErrorResponse"
  378. }
  379. }
  380. }
  381. },
  382. "post": {
  383. "security": [
  384. {
  385. "APIKey": []
  386. }
  387. ],
  388. "consumes": [
  389. "application/json"
  390. ],
  391. "produces": [
  392. "application/json"
  393. ],
  394. "tags": [
  395. "Places"
  396. ],
  397. "summary": "Add place",
  398. "parameters": [
  399. {
  400. "description": "Request body",
  401. "name": "data",
  402. "in": "body",
  403. "required": true,
  404. "schema": {
  405. "$ref": "#/definitions/dto.AddPlaceRequest"
  406. }
  407. }
  408. ],
  409. "responses": {
  410. "200": {
  411. "description": "OK",
  412. "schema": {
  413. "$ref": "#/definitions/dto.PlaceResponse"
  414. }
  415. },
  416. "400": {
  417. "description": "Bad Request",
  418. "schema": {
  419. "$ref": "#/definitions/dto.ErrorResponse"
  420. }
  421. },
  422. "500": {
  423. "description": "Internal Server Error",
  424. "schema": {
  425. "$ref": "#/definitions/dto.ErrorResponse"
  426. }
  427. }
  428. }
  429. }
  430. },
  431. "/api/v1/places/tree": {
  432. "get": {
  433. "security": [
  434. {
  435. "APIKey": []
  436. }
  437. ],
  438. "consumes": [
  439. "application/json"
  440. ],
  441. "produces": [
  442. "application/json"
  443. ],
  444. "tags": [
  445. "Places"
  446. ],
  447. "summary": "Get places tree",
  448. "responses": {
  449. "200": {
  450. "description": "OK",
  451. "schema": {
  452. "$ref": "#/definitions/dto.PlaceTreeResponse"
  453. }
  454. },
  455. "500": {
  456. "description": "Internal Server Error",
  457. "schema": {
  458. "$ref": "#/definitions/dto.ErrorResponse"
  459. }
  460. }
  461. }
  462. }
  463. },
  464. "/api/v1/places/{parentPlaceId}/nested": {
  465. "get": {
  466. "security": [
  467. {
  468. "APIKey": []
  469. }
  470. ],
  471. "consumes": [
  472. "application/json"
  473. ],
  474. "produces": [
  475. "application/json"
  476. ],
  477. "tags": [
  478. "Places"
  479. ],
  480. "summary": "Get nested places by parent ID",
  481. "parameters": [
  482. {
  483. "type": "integer",
  484. "description": "Place ID",
  485. "name": "parentPlaceId",
  486. "in": "path",
  487. "required": true
  488. }
  489. ],
  490. "responses": {
  491. "200": {
  492. "description": "OK",
  493. "schema": {
  494. "$ref": "#/definitions/dto.PlacesResponse"
  495. }
  496. },
  497. "400": {
  498. "description": "Bad Request",
  499. "schema": {
  500. "$ref": "#/definitions/dto.ErrorResponse"
  501. }
  502. },
  503. "500": {
  504. "description": "Internal Server Error",
  505. "schema": {
  506. "$ref": "#/definitions/dto.ErrorResponse"
  507. }
  508. }
  509. }
  510. }
  511. },
  512. "/api/v1/places/{placeId}": {
  513. "get": {
  514. "security": [
  515. {
  516. "APIKey": []
  517. }
  518. ],
  519. "consumes": [
  520. "application/json"
  521. ],
  522. "produces": [
  523. "application/json"
  524. ],
  525. "tags": [
  526. "Places"
  527. ],
  528. "summary": "Get one place",
  529. "parameters": [
  530. {
  531. "type": "integer",
  532. "description": "Place ID",
  533. "name": "placeId",
  534. "in": "path",
  535. "required": true
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "OK",
  541. "schema": {
  542. "$ref": "#/definitions/dto.PlaceResponse"
  543. }
  544. },
  545. "400": {
  546. "description": "Bad Request",
  547. "schema": {
  548. "$ref": "#/definitions/dto.ErrorResponse"
  549. }
  550. },
  551. "404": {
  552. "description": "Not Found",
  553. "schema": {
  554. "$ref": "#/definitions/dto.EmptyResponse"
  555. }
  556. },
  557. "500": {
  558. "description": "Internal Server Error",
  559. "schema": {
  560. "$ref": "#/definitions/dto.ErrorResponse"
  561. }
  562. }
  563. }
  564. },
  565. "put": {
  566. "security": [
  567. {
  568. "APIKey": []
  569. }
  570. ],
  571. "consumes": [
  572. "application/json"
  573. ],
  574. "produces": [
  575. "application/json"
  576. ],
  577. "tags": [
  578. "Places"
  579. ],
  580. "summary": "Update place",
  581. "parameters": [
  582. {
  583. "type": "integer",
  584. "description": "Place ID",
  585. "name": "placeId",
  586. "in": "path",
  587. "required": true
  588. },
  589. {
  590. "description": "Request body",
  591. "name": "data",
  592. "in": "body",
  593. "required": true,
  594. "schema": {
  595. "$ref": "#/definitions/dto.UpdatePlaceRequest"
  596. }
  597. }
  598. ],
  599. "responses": {
  600. "200": {
  601. "description": "OK",
  602. "schema": {
  603. "$ref": "#/definitions/dto.PlaceResponse"
  604. }
  605. },
  606. "400": {
  607. "description": "Bad Request",
  608. "schema": {
  609. "$ref": "#/definitions/dto.ErrorResponse"
  610. }
  611. },
  612. "500": {
  613. "description": "Internal Server Error",
  614. "schema": {
  615. "$ref": "#/definitions/dto.ErrorResponse"
  616. }
  617. }
  618. }
  619. },
  620. "delete": {
  621. "security": [
  622. {
  623. "APIKey": []
  624. }
  625. ],
  626. "consumes": [
  627. "application/json"
  628. ],
  629. "produces": [
  630. "application/json"
  631. ],
  632. "tags": [
  633. "Places"
  634. ],
  635. "summary": "Delete place",
  636. "parameters": [
  637. {
  638. "type": "integer",
  639. "description": "Place ID",
  640. "name": "placeId",
  641. "in": "path",
  642. "required": true
  643. }
  644. ],
  645. "responses": {
  646. "200": {
  647. "description": "OK",
  648. "schema": {
  649. "$ref": "#/definitions/dto.EmptyResponse"
  650. }
  651. },
  652. "400": {
  653. "description": "Bad Request",
  654. "schema": {
  655. "$ref": "#/definitions/dto.ErrorResponse"
  656. }
  657. },
  658. "500": {
  659. "description": "Internal Server Error",
  660. "schema": {
  661. "$ref": "#/definitions/dto.ErrorResponse"
  662. }
  663. }
  664. }
  665. }
  666. },
  667. "/api/v1/tags": {
  668. "get": {
  669. "security": [
  670. {
  671. "APIKey": []
  672. }
  673. ],
  674. "consumes": [
  675. "application/json"
  676. ],
  677. "produces": [
  678. "application/json"
  679. ],
  680. "tags": [
  681. "Tags"
  682. ],
  683. "summary": "Get tags",
  684. "responses": {
  685. "200": {
  686. "description": "OK",
  687. "schema": {
  688. "$ref": "#/definitions/dto.TagsResponse"
  689. }
  690. },
  691. "400": {
  692. "description": "Bad Request",
  693. "schema": {
  694. "$ref": "#/definitions/dto.ErrorResponse"
  695. }
  696. },
  697. "500": {
  698. "description": "Internal Server Error",
  699. "schema": {
  700. "$ref": "#/definitions/dto.ErrorResponse"
  701. }
  702. }
  703. }
  704. },
  705. "post": {
  706. "security": [
  707. {
  708. "APIKey": []
  709. }
  710. ],
  711. "consumes": [
  712. "application/json"
  713. ],
  714. "produces": [
  715. "application/json"
  716. ],
  717. "tags": [
  718. "Tags"
  719. ],
  720. "summary": "Add tag",
  721. "parameters": [
  722. {
  723. "description": "Request body",
  724. "name": "data",
  725. "in": "body",
  726. "required": true,
  727. "schema": {
  728. "$ref": "#/definitions/dto.AddTagRequest"
  729. }
  730. }
  731. ],
  732. "responses": {
  733. "200": {
  734. "description": "OK",
  735. "schema": {
  736. "$ref": "#/definitions/dto.TagResponse"
  737. }
  738. },
  739. "400": {
  740. "description": "Bad Request",
  741. "schema": {
  742. "$ref": "#/definitions/dto.ErrorResponse"
  743. }
  744. },
  745. "500": {
  746. "description": "Internal Server Error",
  747. "schema": {
  748. "$ref": "#/definitions/dto.ErrorResponse"
  749. }
  750. }
  751. }
  752. }
  753. },
  754. "/api/v1/tags/thing/{thingId}": {
  755. "get": {
  756. "security": [
  757. {
  758. "APIKey": []
  759. }
  760. ],
  761. "consumes": [
  762. "application/json"
  763. ],
  764. "produces": [
  765. "application/json"
  766. ],
  767. "tags": [
  768. "Tags"
  769. ],
  770. "summary": "Get thing tags",
  771. "parameters": [
  772. {
  773. "type": "integer",
  774. "description": "Thing ID",
  775. "name": "thingId",
  776. "in": "path",
  777. "required": true
  778. }
  779. ],
  780. "responses": {
  781. "200": {
  782. "description": "OK",
  783. "schema": {
  784. "$ref": "#/definitions/dto.TagsResponse"
  785. }
  786. },
  787. "400": {
  788. "description": "Bad Request",
  789. "schema": {
  790. "$ref": "#/definitions/dto.ErrorResponse"
  791. }
  792. },
  793. "500": {
  794. "description": "Internal Server Error",
  795. "schema": {
  796. "$ref": "#/definitions/dto.ErrorResponse"
  797. }
  798. }
  799. }
  800. }
  801. },
  802. "/api/v1/tags/{tagId}": {
  803. "get": {
  804. "security": [
  805. {
  806. "APIKey": []
  807. }
  808. ],
  809. "consumes": [
  810. "application/json"
  811. ],
  812. "produces": [
  813. "application/json"
  814. ],
  815. "tags": [
  816. "Tags"
  817. ],
  818. "summary": "Get one tag",
  819. "parameters": [
  820. {
  821. "type": "integer",
  822. "description": "Tag ID",
  823. "name": "tagId",
  824. "in": "path",
  825. "required": true
  826. }
  827. ],
  828. "responses": {
  829. "200": {
  830. "description": "OK",
  831. "schema": {
  832. "$ref": "#/definitions/dto.TagResponse"
  833. }
  834. },
  835. "400": {
  836. "description": "Bad Request",
  837. "schema": {
  838. "$ref": "#/definitions/dto.ErrorResponse"
  839. }
  840. },
  841. "404": {
  842. "description": "Not Found",
  843. "schema": {
  844. "$ref": "#/definitions/dto.EmptyResponse"
  845. }
  846. },
  847. "500": {
  848. "description": "Internal Server Error",
  849. "schema": {
  850. "$ref": "#/definitions/dto.ErrorResponse"
  851. }
  852. }
  853. }
  854. },
  855. "put": {
  856. "security": [
  857. {
  858. "APIKey": []
  859. }
  860. ],
  861. "consumes": [
  862. "application/json"
  863. ],
  864. "produces": [
  865. "application/json"
  866. ],
  867. "tags": [
  868. "Tags"
  869. ],
  870. "summary": "Update tag",
  871. "parameters": [
  872. {
  873. "type": "integer",
  874. "description": "Tag ID",
  875. "name": "tagId",
  876. "in": "path",
  877. "required": true
  878. },
  879. {
  880. "description": "Request body",
  881. "name": "data",
  882. "in": "body",
  883. "required": true,
  884. "schema": {
  885. "$ref": "#/definitions/dto.UpdateTagRequest"
  886. }
  887. }
  888. ],
  889. "responses": {
  890. "200": {
  891. "description": "OK",
  892. "schema": {
  893. "$ref": "#/definitions/dto.TagResponse"
  894. }
  895. },
  896. "400": {
  897. "description": "Bad Request",
  898. "schema": {
  899. "$ref": "#/definitions/dto.ErrorResponse"
  900. }
  901. },
  902. "500": {
  903. "description": "Internal Server Error",
  904. "schema": {
  905. "$ref": "#/definitions/dto.ErrorResponse"
  906. }
  907. }
  908. }
  909. },
  910. "delete": {
  911. "security": [
  912. {
  913. "APIKey": []
  914. }
  915. ],
  916. "consumes": [
  917. "application/json"
  918. ],
  919. "produces": [
  920. "application/json"
  921. ],
  922. "tags": [
  923. "Tags"
  924. ],
  925. "summary": "Delete tag",
  926. "parameters": [
  927. {
  928. "type": "integer",
  929. "description": "Tag ID",
  930. "name": "tagId",
  931. "in": "path",
  932. "required": true
  933. }
  934. ],
  935. "responses": {
  936. "200": {
  937. "description": "OK",
  938. "schema": {
  939. "$ref": "#/definitions/dto.EmptyResponse"
  940. }
  941. },
  942. "400": {
  943. "description": "Bad Request",
  944. "schema": {
  945. "$ref": "#/definitions/dto.ErrorResponse"
  946. }
  947. },
  948. "500": {
  949. "description": "Internal Server Error",
  950. "schema": {
  951. "$ref": "#/definitions/dto.ErrorResponse"
  952. }
  953. }
  954. }
  955. }
  956. },
  957. "/api/v1/tags/{tagId}/thing/{thingId}": {
  958. "post": {
  959. "security": [
  960. {
  961. "APIKey": []
  962. }
  963. ],
  964. "consumes": [
  965. "application/json"
  966. ],
  967. "produces": [
  968. "application/json"
  969. ],
  970. "tags": [
  971. "Tags"
  972. ],
  973. "summary": "Add thing tag",
  974. "parameters": [
  975. {
  976. "type": "integer",
  977. "description": "Tag ID",
  978. "name": "tagId",
  979. "in": "path",
  980. "required": true
  981. },
  982. {
  983. "type": "integer",
  984. "description": "Thing ID",
  985. "name": "thingId",
  986. "in": "path",
  987. "required": true
  988. }
  989. ],
  990. "responses": {
  991. "200": {
  992. "description": "OK",
  993. "schema": {
  994. "$ref": "#/definitions/dto.TagResponse"
  995. }
  996. },
  997. "400": {
  998. "description": "Bad Request",
  999. "schema": {
  1000. "$ref": "#/definitions/dto.ErrorResponse"
  1001. }
  1002. },
  1003. "500": {
  1004. "description": "Internal Server Error",
  1005. "schema": {
  1006. "$ref": "#/definitions/dto.ErrorResponse"
  1007. }
  1008. }
  1009. }
  1010. },
  1011. "delete": {
  1012. "security": [
  1013. {
  1014. "APIKey": []
  1015. }
  1016. ],
  1017. "consumes": [
  1018. "application/json"
  1019. ],
  1020. "produces": [
  1021. "application/json"
  1022. ],
  1023. "tags": [
  1024. "Tags"
  1025. ],
  1026. "summary": "Delete thing tag",
  1027. "parameters": [
  1028. {
  1029. "type": "integer",
  1030. "description": "Tag ID",
  1031. "name": "tagId",
  1032. "in": "path",
  1033. "required": true
  1034. },
  1035. {
  1036. "type": "integer",
  1037. "description": "Thing ID",
  1038. "name": "thingId",
  1039. "in": "path",
  1040. "required": true
  1041. }
  1042. ],
  1043. "responses": {
  1044. "200": {
  1045. "description": "OK",
  1046. "schema": {
  1047. "$ref": "#/definitions/dto.EmptyResponse"
  1048. }
  1049. },
  1050. "400": {
  1051. "description": "Bad Request",
  1052. "schema": {
  1053. "$ref": "#/definitions/dto.ErrorResponse"
  1054. }
  1055. },
  1056. "500": {
  1057. "description": "Internal Server Error",
  1058. "schema": {
  1059. "$ref": "#/definitions/dto.ErrorResponse"
  1060. }
  1061. }
  1062. }
  1063. }
  1064. },
  1065. "/api/v1/things": {
  1066. "post": {
  1067. "security": [
  1068. {
  1069. "APIKey": []
  1070. }
  1071. ],
  1072. "consumes": [
  1073. "application/json"
  1074. ],
  1075. "produces": [
  1076. "application/json"
  1077. ],
  1078. "tags": [
  1079. "Things"
  1080. ],
  1081. "summary": "Add thing",
  1082. "parameters": [
  1083. {
  1084. "description": "Request body",
  1085. "name": "data",
  1086. "in": "body",
  1087. "required": true,
  1088. "schema": {
  1089. "$ref": "#/definitions/dto.AddThingRequest"
  1090. }
  1091. }
  1092. ],
  1093. "responses": {
  1094. "200": {
  1095. "description": "OK",
  1096. "schema": {
  1097. "$ref": "#/definitions/dto.ThingResponse"
  1098. }
  1099. },
  1100. "400": {
  1101. "description": "Bad Request",
  1102. "schema": {
  1103. "$ref": "#/definitions/dto.ErrorResponse"
  1104. }
  1105. },
  1106. "500": {
  1107. "description": "Internal Server Error",
  1108. "schema": {
  1109. "$ref": "#/definitions/dto.ErrorResponse"
  1110. }
  1111. }
  1112. }
  1113. }
  1114. },
  1115. "/api/v1/things/notifications": {
  1116. "post": {
  1117. "security": [
  1118. {
  1119. "APIKey": []
  1120. }
  1121. ],
  1122. "consumes": [
  1123. "application/json"
  1124. ],
  1125. "produces": [
  1126. "application/json"
  1127. ],
  1128. "tags": [
  1129. "Notifications"
  1130. ],
  1131. "summary": "Add thing notification",
  1132. "parameters": [
  1133. {
  1134. "description": "Request body",
  1135. "name": "data",
  1136. "in": "body",
  1137. "required": true,
  1138. "schema": {
  1139. "$ref": "#/definitions/dto.AddThingNotificationRequest"
  1140. }
  1141. }
  1142. ],
  1143. "responses": {
  1144. "200": {
  1145. "description": "OK",
  1146. "schema": {
  1147. "$ref": "#/definitions/dto.ThingNotificationResponse"
  1148. }
  1149. },
  1150. "400": {
  1151. "description": "Bad Request",
  1152. "schema": {
  1153. "$ref": "#/definitions/dto.ErrorResponse"
  1154. }
  1155. },
  1156. "500": {
  1157. "description": "Internal Server Error",
  1158. "schema": {
  1159. "$ref": "#/definitions/dto.ErrorResponse"
  1160. }
  1161. }
  1162. }
  1163. }
  1164. },
  1165. "/api/v1/things/notifications/expired": {
  1166. "get": {
  1167. "security": [
  1168. {
  1169. "APIKey": []
  1170. }
  1171. ],
  1172. "consumes": [
  1173. "application/json"
  1174. ],
  1175. "produces": [
  1176. "application/json"
  1177. ],
  1178. "tags": [
  1179. "Notifications"
  1180. ],
  1181. "summary": "Get expired thing notifications",
  1182. "responses": {
  1183. "200": {
  1184. "description": "OK",
  1185. "schema": {
  1186. "$ref": "#/definitions/dto.ThingNotificationsExtResponse"
  1187. }
  1188. },
  1189. "400": {
  1190. "description": "Bad Request",
  1191. "schema": {
  1192. "$ref": "#/definitions/dto.ErrorResponse"
  1193. }
  1194. },
  1195. "500": {
  1196. "description": "Internal Server Error",
  1197. "schema": {
  1198. "$ref": "#/definitions/dto.ErrorResponse"
  1199. }
  1200. }
  1201. }
  1202. }
  1203. },
  1204. "/api/v1/things/notifications/{thingId}": {
  1205. "get": {
  1206. "security": [
  1207. {
  1208. "APIKey": []
  1209. }
  1210. ],
  1211. "consumes": [
  1212. "application/json"
  1213. ],
  1214. "produces": [
  1215. "application/json"
  1216. ],
  1217. "tags": [
  1218. "Notifications"
  1219. ],
  1220. "summary": "Get thing notification",
  1221. "parameters": [
  1222. {
  1223. "type": "integer",
  1224. "description": "Thing ID",
  1225. "name": "thingId",
  1226. "in": "path",
  1227. "required": true
  1228. }
  1229. ],
  1230. "responses": {
  1231. "200": {
  1232. "description": "OK",
  1233. "schema": {
  1234. "$ref": "#/definitions/dto.ThingNotificationResponse"
  1235. }
  1236. },
  1237. "400": {
  1238. "description": "Bad Request",
  1239. "schema": {
  1240. "$ref": "#/definitions/dto.ErrorResponse"
  1241. }
  1242. },
  1243. "404": {
  1244. "description": "Not Found",
  1245. "schema": {
  1246. "$ref": "#/definitions/dto.EmptyResponse"
  1247. }
  1248. },
  1249. "500": {
  1250. "description": "Internal Server Error",
  1251. "schema": {
  1252. "$ref": "#/definitions/dto.ErrorResponse"
  1253. }
  1254. }
  1255. }
  1256. },
  1257. "put": {
  1258. "security": [
  1259. {
  1260. "APIKey": []
  1261. }
  1262. ],
  1263. "consumes": [
  1264. "application/json"
  1265. ],
  1266. "produces": [
  1267. "application/json"
  1268. ],
  1269. "tags": [
  1270. "Notifications"
  1271. ],
  1272. "summary": "Update thing notification",
  1273. "parameters": [
  1274. {
  1275. "type": "integer",
  1276. "description": "Thing ID",
  1277. "name": "thingId",
  1278. "in": "path",
  1279. "required": true
  1280. },
  1281. {
  1282. "description": "Request body",
  1283. "name": "data",
  1284. "in": "body",
  1285. "required": true,
  1286. "schema": {
  1287. "$ref": "#/definitions/dto.UpdateThingNotificationRequest"
  1288. }
  1289. }
  1290. ],
  1291. "responses": {
  1292. "200": {
  1293. "description": "OK",
  1294. "schema": {
  1295. "$ref": "#/definitions/dto.ThingNotificationResponse"
  1296. }
  1297. },
  1298. "400": {
  1299. "description": "Bad Request",
  1300. "schema": {
  1301. "$ref": "#/definitions/dto.ErrorResponse"
  1302. }
  1303. },
  1304. "500": {
  1305. "description": "Internal Server Error",
  1306. "schema": {
  1307. "$ref": "#/definitions/dto.ErrorResponse"
  1308. }
  1309. }
  1310. }
  1311. },
  1312. "delete": {
  1313. "security": [
  1314. {
  1315. "APIKey": []
  1316. }
  1317. ],
  1318. "consumes": [
  1319. "application/json"
  1320. ],
  1321. "produces": [
  1322. "application/json"
  1323. ],
  1324. "tags": [
  1325. "Notifications"
  1326. ],
  1327. "summary": "Delete thing notification",
  1328. "parameters": [
  1329. {
  1330. "type": "integer",
  1331. "description": "Thing ID",
  1332. "name": "thingId",
  1333. "in": "path",
  1334. "required": true
  1335. }
  1336. ],
  1337. "responses": {
  1338. "200": {
  1339. "description": "OK",
  1340. "schema": {
  1341. "$ref": "#/definitions/dto.EmptyResponse"
  1342. }
  1343. },
  1344. "400": {
  1345. "description": "Bad Request",
  1346. "schema": {
  1347. "$ref": "#/definitions/dto.ErrorResponse"
  1348. }
  1349. },
  1350. "500": {
  1351. "description": "Internal Server Error",
  1352. "schema": {
  1353. "$ref": "#/definitions/dto.ErrorResponse"
  1354. }
  1355. }
  1356. }
  1357. }
  1358. },
  1359. "/api/v1/things/place/{placeId}": {
  1360. "get": {
  1361. "security": [
  1362. {
  1363. "APIKey": []
  1364. }
  1365. ],
  1366. "consumes": [
  1367. "application/json"
  1368. ],
  1369. "produces": [
  1370. "application/json"
  1371. ],
  1372. "tags": [
  1373. "Things"
  1374. ],
  1375. "summary": "Get things by place ID",
  1376. "parameters": [
  1377. {
  1378. "type": "integer",
  1379. "description": "Place ID",
  1380. "name": "placeId",
  1381. "in": "path",
  1382. "required": true
  1383. }
  1384. ],
  1385. "responses": {
  1386. "200": {
  1387. "description": "OK",
  1388. "schema": {
  1389. "$ref": "#/definitions/dto.ThingsExtResponse"
  1390. }
  1391. },
  1392. "400": {
  1393. "description": "Bad Request",
  1394. "schema": {
  1395. "$ref": "#/definitions/dto.ErrorResponse"
  1396. }
  1397. },
  1398. "500": {
  1399. "description": "Internal Server Error",
  1400. "schema": {
  1401. "$ref": "#/definitions/dto.ErrorResponse"
  1402. }
  1403. }
  1404. }
  1405. }
  1406. },
  1407. "/api/v1/things/search/{search}": {
  1408. "get": {
  1409. "security": [
  1410. {
  1411. "APIKey": []
  1412. }
  1413. ],
  1414. "consumes": [
  1415. "application/json"
  1416. ],
  1417. "produces": [
  1418. "application/json"
  1419. ],
  1420. "tags": [
  1421. "Things"
  1422. ],
  1423. "summary": "Search things",
  1424. "parameters": [
  1425. {
  1426. "type": "string",
  1427. "description": "Search string",
  1428. "name": "search",
  1429. "in": "path",
  1430. "required": true
  1431. }
  1432. ],
  1433. "responses": {
  1434. "200": {
  1435. "description": "OK",
  1436. "schema": {
  1437. "$ref": "#/definitions/dto.ThingResponse"
  1438. }
  1439. },
  1440. "400": {
  1441. "description": "Bad Request",
  1442. "schema": {
  1443. "$ref": "#/definitions/dto.ErrorResponse"
  1444. }
  1445. },
  1446. "500": {
  1447. "description": "Internal Server Error",
  1448. "schema": {
  1449. "$ref": "#/definitions/dto.ErrorResponse"
  1450. }
  1451. }
  1452. }
  1453. }
  1454. },
  1455. "/api/v1/things/{thingId}": {
  1456. "get": {
  1457. "security": [
  1458. {
  1459. "APIKey": []
  1460. }
  1461. ],
  1462. "consumes": [
  1463. "application/json"
  1464. ],
  1465. "produces": [
  1466. "application/json"
  1467. ],
  1468. "tags": [
  1469. "Things"
  1470. ],
  1471. "summary": "Get one thing",
  1472. "parameters": [
  1473. {
  1474. "type": "integer",
  1475. "description": "Thing ID",
  1476. "name": "thingId",
  1477. "in": "path",
  1478. "required": true
  1479. }
  1480. ],
  1481. "responses": {
  1482. "200": {
  1483. "description": "OK",
  1484. "schema": {
  1485. "$ref": "#/definitions/dto.ThingResponse"
  1486. }
  1487. },
  1488. "400": {
  1489. "description": "Bad Request",
  1490. "schema": {
  1491. "$ref": "#/definitions/dto.ErrorResponse"
  1492. }
  1493. },
  1494. "404": {
  1495. "description": "Not Found",
  1496. "schema": {
  1497. "$ref": "#/definitions/dto.EmptyResponse"
  1498. }
  1499. },
  1500. "500": {
  1501. "description": "Internal Server Error",
  1502. "schema": {
  1503. "$ref": "#/definitions/dto.ErrorResponse"
  1504. }
  1505. }
  1506. }
  1507. },
  1508. "put": {
  1509. "security": [
  1510. {
  1511. "APIKey": []
  1512. }
  1513. ],
  1514. "consumes": [
  1515. "application/json"
  1516. ],
  1517. "produces": [
  1518. "application/json"
  1519. ],
  1520. "tags": [
  1521. "Things"
  1522. ],
  1523. "summary": "Update thing",
  1524. "parameters": [
  1525. {
  1526. "type": "integer",
  1527. "description": "Thing ID",
  1528. "name": "thingId",
  1529. "in": "path",
  1530. "required": true
  1531. },
  1532. {
  1533. "description": "Request body",
  1534. "name": "data",
  1535. "in": "body",
  1536. "required": true,
  1537. "schema": {
  1538. "$ref": "#/definitions/dto.UpdateThingRequest"
  1539. }
  1540. }
  1541. ],
  1542. "responses": {
  1543. "200": {
  1544. "description": "OK",
  1545. "schema": {
  1546. "$ref": "#/definitions/dto.ThingResponse"
  1547. }
  1548. },
  1549. "400": {
  1550. "description": "Bad Request",
  1551. "schema": {
  1552. "$ref": "#/definitions/dto.ErrorResponse"
  1553. }
  1554. },
  1555. "500": {
  1556. "description": "Internal Server Error",
  1557. "schema": {
  1558. "$ref": "#/definitions/dto.ErrorResponse"
  1559. }
  1560. }
  1561. }
  1562. },
  1563. "delete": {
  1564. "security": [
  1565. {
  1566. "APIKey": []
  1567. }
  1568. ],
  1569. "consumes": [
  1570. "application/json"
  1571. ],
  1572. "produces": [
  1573. "application/json"
  1574. ],
  1575. "tags": [
  1576. "Things"
  1577. ],
  1578. "summary": "Delete thing",
  1579. "parameters": [
  1580. {
  1581. "type": "integer",
  1582. "description": "Thing ID",
  1583. "name": "thingId",
  1584. "in": "path",
  1585. "required": true
  1586. }
  1587. ],
  1588. "responses": {
  1589. "200": {
  1590. "description": "OK",
  1591. "schema": {
  1592. "$ref": "#/definitions/dto.EmptyResponse"
  1593. }
  1594. },
  1595. "400": {
  1596. "description": "Bad Request",
  1597. "schema": {
  1598. "$ref": "#/definitions/dto.ErrorResponse"
  1599. }
  1600. },
  1601. "500": {
  1602. "description": "Internal Server Error",
  1603. "schema": {
  1604. "$ref": "#/definitions/dto.ErrorResponse"
  1605. }
  1606. }
  1607. }
  1608. }
  1609. },
  1610. "/api/v1/users": {
  1611. "put": {
  1612. "security": [
  1613. {
  1614. "APIKey": []
  1615. }
  1616. ],
  1617. "consumes": [
  1618. "application/json"
  1619. ],
  1620. "produces": [
  1621. "application/json"
  1622. ],
  1623. "tags": [
  1624. "Users"
  1625. ],
  1626. "summary": "Update user",
  1627. "parameters": [
  1628. {
  1629. "description": "Request body",
  1630. "name": "data",
  1631. "in": "body",
  1632. "required": true,
  1633. "schema": {
  1634. "$ref": "#/definitions/dto.UpdateUserRequest"
  1635. }
  1636. }
  1637. ],
  1638. "responses": {
  1639. "200": {
  1640. "description": "OK",
  1641. "schema": {
  1642. "$ref": "#/definitions/dto.EmptyResponse"
  1643. }
  1644. },
  1645. "400": {
  1646. "description": "Bad Request",
  1647. "schema": {
  1648. "$ref": "#/definitions/dto.ErrorResponse"
  1649. }
  1650. },
  1651. "500": {
  1652. "description": "Internal Server Error",
  1653. "schema": {
  1654. "$ref": "#/definitions/dto.ErrorResponse"
  1655. }
  1656. }
  1657. }
  1658. },
  1659. "post": {
  1660. "security": [
  1661. {
  1662. "APIKey": []
  1663. }
  1664. ],
  1665. "consumes": [
  1666. "application/json"
  1667. ],
  1668. "produces": [
  1669. "application/json"
  1670. ],
  1671. "tags": [
  1672. "Users"
  1673. ],
  1674. "summary": "Add user",
  1675. "parameters": [
  1676. {
  1677. "description": "Request body",
  1678. "name": "data",
  1679. "in": "body",
  1680. "required": true,
  1681. "schema": {
  1682. "$ref": "#/definitions/dto.AddUserRequest"
  1683. }
  1684. }
  1685. ],
  1686. "responses": {
  1687. "200": {
  1688. "description": "OK",
  1689. "schema": {
  1690. "$ref": "#/definitions/dto.EmptyResponse"
  1691. }
  1692. },
  1693. "400": {
  1694. "description": "Bad Request",
  1695. "schema": {
  1696. "$ref": "#/definitions/dto.ErrorResponse"
  1697. }
  1698. },
  1699. "500": {
  1700. "description": "Internal Server Error",
  1701. "schema": {
  1702. "$ref": "#/definitions/dto.ErrorResponse"
  1703. }
  1704. }
  1705. }
  1706. }
  1707. }
  1708. },
  1709. "definitions": {
  1710. "dto.AddPlaceRequest": {
  1711. "type": "object",
  1712. "required": [
  1713. "title"
  1714. ],
  1715. "properties": {
  1716. "parent_id": {
  1717. "type": "integer"
  1718. },
  1719. "title": {
  1720. "type": "string"
  1721. }
  1722. }
  1723. },
  1724. "dto.AddTagRequest": {
  1725. "type": "object",
  1726. "required": [
  1727. "style",
  1728. "title"
  1729. ],
  1730. "properties": {
  1731. "style": {
  1732. "type": "string"
  1733. },
  1734. "title": {
  1735. "type": "string"
  1736. }
  1737. }
  1738. },
  1739. "dto.AddThingNotificationRequest": {
  1740. "type": "object",
  1741. "required": [
  1742. "notification_date",
  1743. "thing_id"
  1744. ],
  1745. "properties": {
  1746. "notification_date": {
  1747. "type": "string",
  1748. "format": "date-time"
  1749. },
  1750. "thing_id": {
  1751. "type": "integer"
  1752. }
  1753. }
  1754. },
  1755. "dto.AddThingRequest": {
  1756. "type": "object",
  1757. "required": [
  1758. "place_id",
  1759. "title"
  1760. ],
  1761. "properties": {
  1762. "description": {
  1763. "type": "string"
  1764. },
  1765. "place_id": {
  1766. "type": "integer"
  1767. },
  1768. "title": {
  1769. "type": "string"
  1770. }
  1771. }
  1772. },
  1773. "dto.AddUserRequest": {
  1774. "type": "object",
  1775. "required": [
  1776. "password",
  1777. "username"
  1778. ],
  1779. "properties": {
  1780. "password": {
  1781. "type": "string"
  1782. },
  1783. "username": {
  1784. "type": "string"
  1785. }
  1786. }
  1787. },
  1788. "dto.EmptyResponse": {
  1789. "type": "object"
  1790. },
  1791. "dto.ErrorResponse": {
  1792. "type": "object",
  1793. "properties": {
  1794. "error": {
  1795. "type": "string"
  1796. }
  1797. }
  1798. },
  1799. "dto.ImageResponse": {
  1800. "type": "object",
  1801. "properties": {
  1802. "created_at": {
  1803. "type": "string"
  1804. },
  1805. "id": {
  1806. "type": "integer"
  1807. },
  1808. "image": {
  1809. "type": "string"
  1810. },
  1811. "place_id": {
  1812. "type": "integer"
  1813. },
  1814. "thing_id": {
  1815. "type": "integer"
  1816. }
  1817. }
  1818. },
  1819. "dto.ImagesResponse": {
  1820. "type": "object",
  1821. "properties": {
  1822. "images": {
  1823. "type": "array",
  1824. "items": {
  1825. "$ref": "#/definitions/dto.ImageResponse"
  1826. }
  1827. }
  1828. }
  1829. },
  1830. "dto.LoginRequest": {
  1831. "type": "object",
  1832. "required": [
  1833. "password",
  1834. "username"
  1835. ],
  1836. "properties": {
  1837. "password": {
  1838. "type": "string"
  1839. },
  1840. "username": {
  1841. "type": "string"
  1842. }
  1843. }
  1844. },
  1845. "dto.LoginResponse": {
  1846. "type": "object",
  1847. "properties": {
  1848. "token": {
  1849. "type": "string"
  1850. }
  1851. }
  1852. },
  1853. "dto.PlaceResponse": {
  1854. "type": "object",
  1855. "properties": {
  1856. "created_at": {
  1857. "type": "string"
  1858. },
  1859. "id": {
  1860. "type": "integer"
  1861. },
  1862. "parent_id": {
  1863. "type": "integer"
  1864. },
  1865. "title": {
  1866. "type": "string"
  1867. },
  1868. "updated_at": {
  1869. "type": "string"
  1870. }
  1871. }
  1872. },
  1873. "dto.PlaceTree": {
  1874. "type": "object",
  1875. "properties": {
  1876. "nested": {
  1877. "type": "array",
  1878. "items": {
  1879. "$ref": "#/definitions/dto.PlaceTree"
  1880. }
  1881. },
  1882. "place": {
  1883. "$ref": "#/definitions/dto.PlaceResponse"
  1884. }
  1885. }
  1886. },
  1887. "dto.PlaceTreeResponse": {
  1888. "type": "object",
  1889. "properties": {
  1890. "places": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/definitions/dto.PlaceTree"
  1894. }
  1895. }
  1896. }
  1897. },
  1898. "dto.PlacesResponse": {
  1899. "type": "object",
  1900. "properties": {
  1901. "places": {
  1902. "type": "array",
  1903. "items": {
  1904. "$ref": "#/definitions/dto.PlaceResponse"
  1905. }
  1906. }
  1907. }
  1908. },
  1909. "dto.TagResponse": {
  1910. "type": "object",
  1911. "properties": {
  1912. "created_at": {
  1913. "type": "string"
  1914. },
  1915. "id": {
  1916. "type": "integer"
  1917. },
  1918. "style": {
  1919. "type": "string"
  1920. },
  1921. "title": {
  1922. "type": "string"
  1923. },
  1924. "updated_at": {
  1925. "type": "string"
  1926. }
  1927. }
  1928. },
  1929. "dto.TagsResponse": {
  1930. "type": "object",
  1931. "properties": {
  1932. "tags": {
  1933. "type": "array",
  1934. "items": {
  1935. "$ref": "#/definitions/dto.TagResponse"
  1936. }
  1937. }
  1938. }
  1939. },
  1940. "dto.ThingExtResponse": {
  1941. "type": "object",
  1942. "properties": {
  1943. "created_at": {
  1944. "type": "string"
  1945. },
  1946. "description": {
  1947. "type": "string"
  1948. },
  1949. "id": {
  1950. "type": "integer"
  1951. },
  1952. "place_id": {
  1953. "type": "integer"
  1954. },
  1955. "tags": {
  1956. "type": "array",
  1957. "items": {
  1958. "$ref": "#/definitions/dto.TagResponse"
  1959. }
  1960. },
  1961. "title": {
  1962. "type": "string"
  1963. },
  1964. "updated_at": {
  1965. "type": "string"
  1966. }
  1967. }
  1968. },
  1969. "dto.ThingNotificationExtResponse": {
  1970. "type": "object",
  1971. "properties": {
  1972. "created_at": {
  1973. "type": "string"
  1974. },
  1975. "notification_date": {
  1976. "type": "string"
  1977. },
  1978. "place_id": {
  1979. "type": "integer"
  1980. },
  1981. "place_title": {
  1982. "type": "string"
  1983. },
  1984. "thing_id": {
  1985. "type": "integer"
  1986. },
  1987. "thing_title": {
  1988. "type": "string"
  1989. },
  1990. "updated_at": {
  1991. "type": "string"
  1992. }
  1993. }
  1994. },
  1995. "dto.ThingNotificationResponse": {
  1996. "type": "object",
  1997. "properties": {
  1998. "created_at": {
  1999. "type": "string"
  2000. },
  2001. "id": {
  2002. "type": "integer"
  2003. },
  2004. "notification_date": {
  2005. "type": "string"
  2006. },
  2007. "updated_at": {
  2008. "type": "string"
  2009. }
  2010. }
  2011. },
  2012. "dto.ThingNotificationsExtResponse": {
  2013. "type": "object",
  2014. "properties": {
  2015. "notifications": {
  2016. "type": "array",
  2017. "items": {
  2018. "$ref": "#/definitions/dto.ThingNotificationExtResponse"
  2019. }
  2020. }
  2021. }
  2022. },
  2023. "dto.ThingResponse": {
  2024. "type": "object",
  2025. "properties": {
  2026. "created_at": {
  2027. "type": "string"
  2028. },
  2029. "description": {
  2030. "type": "string"
  2031. },
  2032. "id": {
  2033. "type": "integer"
  2034. },
  2035. "place_id": {
  2036. "type": "integer"
  2037. },
  2038. "title": {
  2039. "type": "string"
  2040. },
  2041. "updated_at": {
  2042. "type": "string"
  2043. }
  2044. }
  2045. },
  2046. "dto.ThingsExtResponse": {
  2047. "type": "object",
  2048. "properties": {
  2049. "things": {
  2050. "type": "array",
  2051. "items": {
  2052. "$ref": "#/definitions/dto.ThingExtResponse"
  2053. }
  2054. }
  2055. }
  2056. },
  2057. "dto.UpdatePlaceRequest": {
  2058. "type": "object",
  2059. "required": [
  2060. "title"
  2061. ],
  2062. "properties": {
  2063. "parent_id": {
  2064. "type": "integer"
  2065. },
  2066. "title": {
  2067. "type": "string"
  2068. }
  2069. }
  2070. },
  2071. "dto.UpdateTagRequest": {
  2072. "type": "object",
  2073. "required": [
  2074. "style",
  2075. "title"
  2076. ],
  2077. "properties": {
  2078. "style": {
  2079. "type": "string"
  2080. },
  2081. "title": {
  2082. "type": "string"
  2083. }
  2084. }
  2085. },
  2086. "dto.UpdateThingNotificationRequest": {
  2087. "type": "object",
  2088. "required": [
  2089. "notification_date"
  2090. ],
  2091. "properties": {
  2092. "notification_date": {
  2093. "type": "string",
  2094. "format": "date-time"
  2095. }
  2096. }
  2097. },
  2098. "dto.UpdateThingRequest": {
  2099. "type": "object",
  2100. "required": [
  2101. "place_id",
  2102. "title"
  2103. ],
  2104. "properties": {
  2105. "description": {
  2106. "type": "string"
  2107. },
  2108. "place_id": {
  2109. "type": "integer"
  2110. },
  2111. "title": {
  2112. "type": "string"
  2113. }
  2114. }
  2115. },
  2116. "dto.UpdateUserRequest": {
  2117. "type": "object",
  2118. "properties": {
  2119. "password": {
  2120. "type": "string"
  2121. },
  2122. "username": {
  2123. "type": "string"
  2124. }
  2125. }
  2126. },
  2127. "dto.UserResponse": {
  2128. "type": "object",
  2129. "properties": {
  2130. "username": {
  2131. "type": "string"
  2132. }
  2133. }
  2134. }
  2135. },
  2136. "securityDefinitions": {
  2137. "APIKey": {
  2138. "type": "apiKey",
  2139. "name": "Authorization",
  2140. "in": "header"
  2141. }
  2142. }
  2143. }