swagger.json 67 KB

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