[Bug] Inherited class not generated with referencing
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- yaml
- Domain
- api
Research direction
Reproduce the setup from index.yaml and definitions.yaml with swagger 2.2.3, then trace how the referenced ResponseWrapper«TestDto» inheritance is resolved during generation. Compare the generated models with the hackfix case; done means TestDto is generated from the original response reference without the fake endpoint.
Written by the indexing model from the issue text.
Description
TestDto isn't generated for setup below:
index.yaml
paths:
/testpath:
post:
responses:
'200':
schema:
$ref: './definitions.yaml#/definitions/ResponseWrapper«TestDto»'
definitions.yaml
definitions:
ResponseWrapper:
type: object
properties:
data:
type: object
required:
- data
ResponseWrapper«TestDto»:
allOf:
- $ref: '#/definitions/ResponseWrapper'
- type: object
properties:
data:
$ref: '#/definitions/TestDto'
TestDto:
type: object
properties:
alertId:
type: string
hackfix used to generate TestDto:
paths:
#hackfix for swagger-codegen
/fakeApiPleaseIgnore:
post:
description: hackfix, please ignore
responses:
500:
schema:
$ref: './definitions.yaml#/definitions/TestDto'
swagger 2.2.3
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
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.
More from swagger-api/swagger-codegen
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
swagger-api/swagger-codegen#12755 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
swagger-api/swagger-codegen#12445 ·
-
security vulnerability
Difficulty 1/5 Under an hour Newbie friendliness 62/100
swagger-api/swagger-codegen#11942 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
swagger-api/swagger-codegen#11812 · 1 reaction ·
-
security vulnerability
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
swagger-api/swagger-codegen#11594 ·
All issues in swagger-api/swagger-codegen
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3276 ·
-
good first issue refactor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
[6.x]: "Cannot use object of type stdClass as array" loading Users index (regression of #19182) Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
area/sessions comp/agent P2 tool/skills type/perf
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NousResearch/hermes-agent#117788 ·