Fixed #719: fix generate for union methods.
Fix #719
Any updates? May be something wrong in PR? It will be cool to merge and release, cause at this moment we're using built binary from fork...
I'm running into this problem on my private project.
I was looking into submitting a PR and I found this. I tried this changes on my own and confirmed the problem went away. I'm going to use replace_of directive until merge this PR. Thank you.
Hey, sorry we've not gotten around to reviewing just yet - will try to in the coming week.
Mind running make generate and committing the generated files?
Hey, sorry we've not gotten around to reviewing just yet - will try to in the coming week.
Mind running
make generateand committing the generated files?
Already done. Nothing new was generated, no changes.
@jamietanna Hi there! =) Any updates? Can we merge it?
I'm having trouble picturing this in use - it'd be great to get an example spec added that uses this under the hood, so we have some test data that can then help us avoid breaking changes in the future - would that be possible? 🙏
Example is in linked issue I'll add it here
openapi: "3.0.0"
info:
version: 1.0.0
title: Example broken generation with oneOf and external remote ref
paths:
/check:
get:
summary: Return broken example
responses:
'200':
description: Ok
content:
application/json:
schema:
items:
$ref: '#/components/schemas/exampleSchema'
components:
schemas:
exampleSchema:
properties:
item:
type: object
oneOf:
- $ref: 'https://raw.githubusercontent.com/deepmap/oapi-codegen/master/examples/petstore-expanded/petstore-expanded.yaml#/components/schemas/NewPet'
required:
- item
"Somewhere in the world a kitten is sad at the moment" (с) But, if seriously, is there any updates?
I never thought when I wrote the original code that we'd be fetching specs over the internet, because that causes a version tracking issue, so we've always cached them locally and updated periodically. As far as oapi-codegen goes, this change looks pretty simple, but your example schema should be included in our tests, to ensure we don't regress on this particular issue in the future.
I never thought when I wrote the original code that we'd be fetching specs over the internet, because that causes a version tracking issue, so we've always cached them locally and updated periodically. As far as oapi-codegen goes, this change looks pretty simple, but your example schema should be included in our tests, to ensure we don't regress on this particular issue in the future.
Ok. Thanks for reply. I'll add new tests for this case and 'll return to you)
@deepmap-marcinr, hi there! I've updated PR: added test-case yaml file and added test for this case.
I'll be grateful if you check this out and merge if everything is ok)
Guys! Any updates? 2 months delaying PR... =(
Guys, it's me again =) Let's review and merge? =)
Done, looks good, thanks.
From: Ageev Pavel @.***> Sent: Saturday, October 22, 2022 5:07 AM To: deepmap/oapi-codegen Cc: Marcin Romaszewicz; Mention Subject: Re: [deepmap/oapi-codegen] Fixed #719: fix generate for union methods. (PR #720)
Guys, it's me again =) Let's review and merge? =)
— Reply to this email directly, view it on GitHubhttps://github.com/deepmap/oapi-codegen/pull/720#issuecomment-1287773741, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALKC5DGH3OBP4BJ72R6LE4DWEPKHLANCNFSM56N7G7RA. You are receiving this because you were mentioned.Message ID: @.***>