{"swagger":"2.0","info":{"description":"API для проекта 0-3 года","version":"1.0.0","title":"0-3 года API","contact":{"email":"0-3years@pushnovn.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"tags":[{"name":"admins","description":"Secured Admin-only calls"},{"name":"developers","description":"Operations available to regular developers"}],"paths":{"/auth":{"get":{"tags":["developers"],"summary":"Авторизация пользователя","description":"Передавая логин и пароль вы можете авторизироваться в системе, получив токен для дальнейшей работы. Токен не имеет срока жизни.\n","produces":["application/json"],"parameters":[{"in":"query","name":"login","description":"Логин пользователя, которого хотим авторизировать","required":true,"type":"string"},{"in":"query","name":"password","description":"Пароль пользователя, которого хотим авторизировать","required":true,"type":"string"}],"responses":{"200":{"description":"User","schema":{"items":{"$ref":"#/definitions/User"}}},"400":{"description":"Ошибка","schema":{"type":"object","items":{"$ref":"#/definitions/Error"}}}}},"post":{"tags":["admins"],"summary":"adds an inventory item","operationId":"addInventory","description":"Adds an item to the system","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"inventoryItem","description":"Inventory item to add","schema":{"$ref":"#/definitions/InventoryItem"}}],"responses":{"201":{"description":"item created"},"400":{"description":"invalid input, object invalid"},"409":{"description":"an existing item already exists"}}}}},"definitions":{"Error":{"type":"object","required":["id","text"],"properties":{"id":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"text":{"type":"string","example":"Error message!!!"}}},"User":{"type":"object","required":["id","login","password","token","isPremium","Children"],"properties":{"id":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"login":{"type":"string","example":"some_login"},"password":{"type":"string","format":"string","example":"pm8no6%$b^Tctc"},"token":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"isPremium":{"type":"boolean","example":true},"Children":{"type":"string","example":"some_login"}}},"InventoryItem":{"type":"object","required":["id","name","manufacturer","releaseDate"],"properties":{"id":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"name":{"type":"string","example":"Widget Adapter"},"releaseDate":{"type":"string","format":"int32","example":"2016-08-29T09:12:33.001Z"},"manufacturer":{"$ref":"#/definitions/Manufacturer"}}},"Manufacturer":{"required":["name"],"properties":{"name":{"type":"string","example":"ACME Corporation"},"homePage":{"type":"string","format":"url","example":"https://www.acme-corp.com"},"phone":{"type":"string","example":"408-867-5309"}}}},"host":"virtserver.swaggerhub.com","schemes":["https","http"],"basePath":"/pushnovn/0-3years/1.0.0"}