docs.go 68 KB

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