SpecFactory doesn't keep scope state resulting in unresolvable relative references
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
Start by tracing SpecFactory into PathsGenerator and the generators it drives, comparing their reference handling with openapi-spec-validator's resolver scope stack. Reproduce the multi-file specification case and verify that the current location is carried through so relative references resolve from the correct base URI.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
I have a set of files that form a spec that fully validates with openapi-spec-validator. It can find all references, but openapi-core cannot and after much debugging I figured out why.
The various generators that are started in the SpecFactory, specifically the PathsGenerator and everything it drives, only keep reference to the top-level spec_url.
When you trace through openapi-spec-validator, you see that with every file change the derefencer.resolver_manager.resolver._scopes_stack increases and the current location is appended to it and used to resolve any references.
But these generators do not do anything with the scope, so cannot resolve the relative path references and the base_uri always remains the same.
- Linguagem predominante
- Python
- Estrelas
- 368
- Forks
- 140
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de python-openapi/openapi-core
-
kind/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
python-openapi/openapi-core#1188 · 2 comentários ·
-
kind/bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
python-openapi/openapi-core#1225 · 2 comentários ·
-
kind/bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 76/100
python-openapi/openapi-core#1212 ·
-
[Bug]: Query parameter validation fails to match empty string when listed as a valid enum value Abertakind/bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
python-openapi/openapi-core#1210 ·
-
kind/bug kind/bug/confirmed
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 58/100
python-openapi/openapi-core#1180 · 3 comentários ·
Todas as issues de python-openapi/openapi-core
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
learningequality/ricecooker#747 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
run-llama/llama_index#23199 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
KhronosGroup/glTF-Blender-IO#2769 ·