acikyazilimagi / deprem-yardim-backend

afetharita.com backend projesi
Apache License 2.0
384 stars 74 forks source link

Swagger.yaml dosyasının güncellenmesi #58

Open yemregundogmus opened 1 year ago

yemregundogmus commented 1 year ago

Backend'in güncel halini yansıtan bir swagger.yaml dosyası yazılması gerekiyor. 1 Gün önceki haline BU LİNK üzerinden ulaşabilirsiniz.

omeruluoglu commented 1 year ago

Auto-generated yeterli ise direk PR açabilirim

Screen Shot 2023-02-07 at 17 59 41

{"swagger": "2.0", "info": {"title": "Deprem-Yardım Backend Auto-Generated Documentation", "description": "", "version": "v1"}, "host": "127.0.0.1:8080", "schemes": ["http"], "basePath": "/", "consumes": ["application/json"], "produces": ["application/json"], "securityDefinitions": {"Basic": {"type": "basic"}}, "security": [{"Basic": []}], "paths": {"/core/health/": {"get": {"operationId": "core_health_list", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["core"]}, "parameters": []}, "/tweets/areas": {"get": {"operationId": "tweets_areas_list", "description": "list method retrieves a list of objects in the queryset based on the bounds defined by the\n ne_lat, ne_lng, sw_lat, sw_lng parameters provided in the request query_params.\n\nThe method returns an HTTP 400 BAD REQUEST error if any of the four parameters are not provided in the query.\nIf the parameters are not float values, an HTTP error is returned.\n\nIf the input is valid, the method filters the queryset based on the bounds and returns a serialized list of\nobjects in the queryset in an HTTP 200 OK response.", "parameters": [{"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Location"}}}}}}, "tags": ["tweets"]}, "parameters": []}, "/tweets/areas/count": {"get": {"operationId": "tweets_areas_count_list", "description": "", "parameters": [{"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Location"}}}}}}, "tags": ["tweets"]}, "parameters": []}, "/tweets/cities": {"get": {"operationId": "tweets_cities_list", "description": "", "parameters": [], "responses": {"200": {"description": ""}}, "tags": ["tweets"]}, "parameters": []}, "/tweets/locations": {"get": {"operationId": "tweets_locations_list", "description": "", "parameters": [{"name": "page", "in": "query", "description": "A page number within the paginated result set.", "required": false, "type": "integer"}, {"name": "page_size", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}], "responses": {"200": {"description": "", "schema": {"required": ["count", "results"], "type": "object", "properties": {"count": {"type": "integer"}, "next": {"type": "string", "format": "uri", "x-nullable": true}, "previous": {"type": "string", "format": "uri", "x-nullable": true}, "results": {"type": "array", "items": {"$ref": "#/definitions/Location"}}}}}}, "tags": ["tweets"]}, "parameters": []}, "/tweets/locations/{id}": {"get": {"operationId": "tweets_locations_read", "description": "", "parameters": [], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/Location"}}}, "tags": ["tweets"]}, "parameters": [{"name": "id", "in": "path", "description": "A unique integer value identifying this location.", "required": true, "type": "integer"}]}}, "definitions": {"Tweet": {"required": ["full_text", "tweet_id", "user_id", "name", "screen_name"], "type": "object", "properties": {"full_text": {"title": "Full text", "type": "string", "minLength": 1}, "tweet_id": {"title": "Tweet id", "type": "string", "maxLength": 255, "minLength": 1}, "user_id": {"title": "User id", "type": "string", "maxLength": 255, "minLength": 1}, "name": {"title": "Name", "type": "string", "maxLength": 255, "minLength": 1}, "screen_name": {"title": "Screen name", "type": "string", "maxLength": 512, "minLength": 1}}}, "Address": {"required": ["address"], "type": "object", "properties": {"address": {"title": "Address", "type": "string", "minLength": 1}, "city": {"title": "City", "type": "string", "maxLength": 255, "x-nullable": true}, "distinct": {"title": "Distinct", "type": "string", "maxLength": 255, "x-nullable": true}, "neighbourhood": {"title": "Neighbourhood", "type": "string", "maxLength": 255, "x-nullable": true}, "street": {"title": "Street", "type": "string", "maxLength": 255, "x-nullable": true}, "no": {"title": "No", "type": "string", "maxLength": 255, "x-nullable": true}, "name_surname": {"title": "Name surname", "type": "string", "maxLength": 255, "x-nullable": true}, "tel": {"title": "Tel", "type": "string", "maxLength": 255, "x-nullable": true}}}, "Location": {"required": ["raw", "resolution"], "type": "object", "properties": {"id": {"title": "ID", "type": "integer", "readOnly": true}, "formatted_address": {"title": "Formatted address", "type": "string", "x-nullable": true}, "loc": {"title": "Loc", "type": "string", "readOnly": true}, "viewport": {"title": "Viewport", "type": "string", "readOnly": true}, "raw": {"$ref": "#/definitions/Tweet"}, "resolution": {"$ref": "#/definitions/Address"}}}}}

omeruluoglu commented 1 year ago

PR

ahmetveburak commented 1 year ago

OpenAPI versiyonu 3 olmasi gerekirse drf-spectacular kullanilabilir. Serializer docstring'leri de yazilirsa dokumantasyona yansir. drf-yasg icin acik PR var o yuzden tekrar yollamiyorum.