Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Magic (0.36 sec)

  1. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial006.py

        assert response.json() == {
            "size": 30,
            "content": {
                "name": "Maaaagic",
                "price": 42,
                "description": "Just kiddin', no magic here. ✨",
            },
        }
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  2. docs_src/path_operation_advanced_configuration/tutorial006.py

    from fastapi import FastAPI, Request
    
    app = FastAPI()
    
    
    def magic_data_reader(raw_body: bytes):
        return {
            "size": len(raw_body),
            "content": {
                "name": "Maaaagic",
                "price": 42,
                "description": "Just kiddin', no magic here. ✨",
            },
        }
    
    
    @app.post(
        "/items/",
        openapi_extra={
            "requestBody": {
                "content": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 29 20:01:13 GMT 2021
    - 1K bytes
    - Viewed (0)
Back to top