docs.go 68 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168
  1. // Package docs GENERATED BY SWAG; DO NOT EDIT
  2. // This file was generated by swaggo/swag
  3. package docs
  4. import "github.com/swaggo/swag"
  5. const docTemplate = `{
  6. "schemes": {{ marshal .Schemes }},
  7. "swagger": "2.0",
  8. "info": {
  9. "description": "{{escape .Description}}",
  10. "title": "{{.Title}}",
  11. "contact": {},
  12. "version": "{{.Version}}"
  13. },
  14. "host": "{{.Host}}",
  15. "basePath": "{{.BasePath}}",
  16. "paths": {
  17. "/api/v1/auth/check": {
  18. "get": {
  19. "consumes": [
  20. "application/json"
  21. ],
  22. "produces": [
  23. "application/json"
  24. ],
  25. "tags": [
  26. "Auth"
  27. ],
  28. "summary": "Check auth",
  29. "responses": {
  30. "200": {
  31. "description": "OK",
  32. "schema": {
  33. "$ref": "#/definitions/dto.UserResponse"
  34. }
  35. },
  36. "403": {
  37. "description": "Forbidden",
  38. "schema": {
  39. "$ref": "#/definitions/dto.ErrorResponse"
  40. }
  41. },
  42. "500": {
  43. "description": "Internal Server Error",
  44. "schema": {
  45. "$ref": "#/definitions/dto.ErrorResponse"
  46. }
  47. }
  48. }
  49. }
  50. },
  51. "/api/v1/auth/login": {
  52. "post": {
  53. "consumes": [
  54. "application/json"
  55. ],
  56. "produces": [
  57. "application/json"
  58. ],
  59. "tags": [
  60. "Auth"
  61. ],
  62. "summary": "Log in user",
  63. "parameters": [
  64. {
  65. "description": "Request body",
  66. "name": "data",
  67. "in": "body",
  68. "required": true,
  69. "schema": {
  70. "$ref": "#/definitions/dto.LoginRequest"
  71. }
  72. }
  73. ],
  74. "responses": {
  75. "200": {
  76. "description": "OK",
  77. "schema": {
  78. "$ref": "#/definitions/dto.LoginResponse"
  79. }
  80. },
  81. "400": {
  82. "description": "Bad Request",
  83. "schema": {
  84. "$ref": "#/definitions/dto.ErrorResponse"
  85. }
  86. },
  87. "403": {
  88. "description": "Forbidden",
  89. "schema": {
  90. "$ref": "#/definitions/dto.ErrorResponse"
  91. }
  92. },
  93. "500": {
  94. "description": "Internal Server Error",
  95. "schema": {
  96. "$ref": "#/definitions/dto.ErrorResponse"
  97. }
  98. }
  99. }
  100. }
  101. },
  102. "/api/v1/images": {
  103. "post": {
  104. "security": [
  105. {
  106. "APIKey": []
  107. }
  108. ],
  109. "consumes": [
  110. "multipart/form-data"
  111. ],
  112. "produces": [
  113. "application/json"
  114. ],
  115. "tags": [
  116. "Images"
  117. ],
  118. "summary": "Add images",
  119. "parameters": [
  120. {
  121. "type": "integer",
  122. "description": "Place ID",
  123. "name": "place_id",
  124. "in": "formData"
  125. },
  126. {
  127. "type": "integer",
  128. "description": "Thing ID",
  129. "name": "thing_id",
  130. "in": "formData"
  131. },
  132. {
  133. "type": "array",
  134. "items": {
  135. "type": "file"
  136. },
  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. }
  2162. func init() {
  2163. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  2164. }