Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Code-generation of type hints and handler interfaces

Aberta
#376 3 comentários 3 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
25/100
Tipo de issue
Funcionalidade
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
openapi, python

Direção de pesquisa

Start by reviewing the issue’s proposed comparisons with oapi-codegen and fastapi-code-generator, then identify which supported web frameworks and OpenAPI data need interfaces. The work is done when the project has an agreed design and generated type hints and request-handler interfaces that cover validated request bodies, URL parameters, and headers.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Something still missing in all OpenAPI-first implementations I've seen for Python including openapi-core is type-safety w.r.t. the validated request body, URL parameters, and headers. openapi-core validates this data, but there currently is no way to statically type it except for manually implementing the type hints and manually typing the request handlers. This is brittle and doesn't scale well.

I suggest to generate code containing type hints and request handler interfaces for the supported web frameworks similar to oapi-codegen (Golang) or fastapi-code-generator (Python).

The details need to be discussed and figured out, of course, but I'd appreciate some feedback first. What do you think?

Linguagem predominante
Python
Estrelas
368
Forks
140
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de python-openapi/openapi-core

Todas as issues de python-openapi/openapi-core

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.