forked from saeedghofrani/lm-operator-hub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger-spec.json
1 lines (1 loc) · 3.19 KB
/
swagger-spec.json
1
{"openapi":"3.0.0","paths":{"/api/v1/operator":{"get":{"operationId":"findAllUser","summary":"find all user","description":"find all user","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserEntity"}}}}}},"tags":["operators"],"security":[{"access-token":[]}]}},"/api/v1/operator/login":{"post":{"operationId":"login","summary":"access token by email and password (login with email: [email protected] and password: 123)","description":"login api for user","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginDto"}}}},"responses":{"201":{"description":""}},"tags":["operators"],"security":[{"access-token":[]}]}},"/api/v1/order/page":{"get":{"operationId":"paginationOrder","summary":"order pagination","description":"order pagination\n\n input's will be collected from request Query; 4 optional input:\n\npage => numebr of page\n\nlimit => count of data in each page\n\norderBy => sort data base on provided argument\n\nfilter => filter data base on provided argument\n\nsearch => search data base on provided argument\n\nEXAMPLE => ?page=1&limit=10&orderBy={\"name\": \"asc\"}&filter={\"name\": \"sa\"}&search={\"name\": \"sa\"}\n\nFULL URL => http://127.0.0.1:3000/api/v1/{APIADDRESS}?page=1&limit=10&orderBy={\"name\": \"asc\"}&orderBy={\"id\": \"asc\"}&filter={\"name\": \"sa\"}&search={\"name\": \"sa\"}\n\nFULL URL V2 => http://127.0.0.1:3000/api/v1/{APIADDRESS}?page=1&limit=10&orderBy=[{\"name\": \"asc\"}]&filter=[{\"name\": \"sa\"}]&search=[{\"name\": \"sa\"}]\n ","parameters":[{"name":"page","required":false,"in":"query","example":1,"schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","example":10,"schema":{"type":"number"}},{"name":"orderBy","required":false,"in":"query","description":"you can set any filed of model you trying to sort like {\"id\": \"asc\"}","schema":{"type":"array"}},{"name":"filter","required":false,"in":"query","description":"filter properties are: label, operator, lte, gte; property label and operator is array of ids","schema":{"type":"array"}},{"name":"search","required":false,"in":"query","description":"search properties are: name, email, mobile, order_number,","schema":{"type":"array"}}],"responses":{"200":{"description":""}},"tags":["orders"],"security":[{"access-token":[]}]}},"/api/v1/label":{"get":{"operationId":"listLabel","summary":"list label","description":"list label","parameters":[],"responses":{"200":{"description":""}},"tags":["labels"],"security":[{"access-token":[]}]}}},"info":{"title":"Operator Hub","description":"App","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"access-token":{"scheme":"Bearer","bearerFormat":"Token","type":"http","in":"header"}},"schemas":{"UserEntity":{"type":"object","properties":{"id":{"type":"number"},"deleted":{"format":"date-time","type":"string","default":false},"email":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"}},"required":["id","email","username","password"]},"LoginDto":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]}}}}