Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

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

Open
yemregundogmus opened this issue Feb 7, 2023 · 3 comments
Open

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

yemregundogmus opened this issue Feb 7, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@yemregundogmus
Copy link
Contributor

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.

@yemregundogmus yemregundogmus added the enhancement New feature or request label Feb 7, 2023
@omeruluoglu
Copy link

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
Copy link

omeruluoglu commented Feb 7, 2023

PR

@ahmetveburak
Copy link

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.

@okankaraduman okankaraduman added the documentation Improvements or additions to documentation label Feb 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants