flask-smorest icon indicating copy to clipboard operation
flask-smorest copied to clipboard

DB agnostic framework to build auto-documented REST APIs with Flask and marshmallow

Results 90 flask-smorest issues
Sort by recently updated
recently updated
newest added

All my endpoint support serializing to JSON and CBOR. It is done by overriding the `_prepare_response_content` like that: ```python def _prepare_response_content(data): """ Serialize to JSON or CBOR""" response_mimetype = request.accept_mimetypes.best_match(...

enhancement

seeing this error: raise TypeError(f'Object of type {o.__class__.__name__} ' from JSON module in the dump code: ``` with open("api.json", "w") as outfile: json.dump(tsApi.spec.to_dict(), outfile) ``` How do I find what...

question

## There are a few issues... (shouldn't be merged yet) 1. The `abort(code)` works, but raise ApiException() doesn't work with the json response, in my opinion, raising an `ApiException` should...

So I'm using the flask server for two things. 1. a template-based server-side rendering server. It returns a web page. 2. Building an API server using flask-smorest. Here I ran...

enhancement

I have a simple CRUD class (based on `flask.views.MethodView`). The Schema class is based on `marshmallow_sqlalchemy.SQLAlchemyAutoSchema`. ```python @_bp.arguments(AccountGroupModelSchema) @_bp.response(200, AccountGroupModelSchema) def patch(self, updated, account_group_id): """Update an existing object.""" item =...

question

I have this sample app ```py from flask import Flask, jsonify from flask_smorest import Api, Blueprint as SmorestBlueprint # Initialize Flask app app = Flask(__name__, subdomain_matching=True) app.url_map.default_subdomain = "docs" app.config["API_TITLE"]...

**The original** ``` _The first method:_ from blueprint import bp api = Api(app) api.register_bluepirnt(bp) ``` _The second method_ form blueprint import bp api = Api() # # Must call init_app...

Added .pre-commit-hooks.yaml to expose OpenApi documentation generation to JSON and YAML

I'm encountering issues in streaming response in flask-smorest. I'm following the guidance here - [https://flask.palletsprojects.com/en/2.3.x/patterns/streaming/](url) for streaming responses from my flask-smorest application. Below is the MRE version of my code....

Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.6.1 to 7.6.4. Changelog Sourced from coverage's changelog. Version 7.6.4 — 2024-10-20 fix: multi-line with statements could cause contained branches to be incorrectly marked as missing (issue...

dependencies
python