swagger-api / swagger-api/swagger-parser
Parse report error message bug
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 867
- Forks
- 560
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
I try to parse the following spec yaml:
openapi: 3.0.2
info:
version: v1
title: abc
paths:
/queryCommon:
post:
operationId: query
responses:
"405":
description: Invalid input
components:
schemas:
Body:
type: object
properties:
orgid:
tilte: 'foo' # this is a typo
type: integer
format: int32
Notice that components.schemas.Body.properties.orgid.tilte is a typo. Then got a an error message:
attribute components.schemas.Body.tilte is unexpected
Which is not accurate
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the report with the YAML example and inspect how the validation error path is assembled for components.schemas.Body.properties.orgid.tilte. Trace the parser's handling of nested schema properties and verify that the reported path includes properties.orgid; done means the error identifies the misspelled field at its actual location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100