Skip to content

FastAPI shows no attributes for models. #150

@TNick

Description

@TNick

This simple FastAPI script:

from fastapi import FastAPI
from geojson_pydantic import FeatureCollection

app = FastAPI(
    title="Test geojson-pydantic",
    version="1.0"
)

@app.get("/{dataset}", response_model=FeatureCollection)
def get_dataset(dataset: str):
    raise NotImplementedError

Creates this result in /docs:
image

See here for a simple project.

Edit:

  • fastapi==0.104.1
  • pydantic==2.5.1
  • uvicorn==0.24.0.post1
  • geojson-pydantic==1.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions