Skip to content

Add a note about model-refs in places where they don't work to the 1.2 documentation #2312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

HoldYourWaffle
Copy link
Contributor

@HoldYourWaffle HoldYourWaffle commented Aug 13, 2020

I have no idea if "I'm allowed to do this", but it's currently 3AM and this could've saved me more hours than I want to admit.

In case you're wondering: why is this dude struggeling with a 4 year old spec, I'm trying to use openapi-generator on an API that is described with Swagger 1.2 for some reason. This specification incorrectly declares certain query parameters as "model types", even though they should refer to the ID field of the model. Throwing this at openapi-generator gave me the following (very unhelpful) error:

[main] WARN  o.o.codegen.DefaultCodegen - Unknown type found in the schema: ref
[main] WARN  o.o.c.l.AbstractCSharpCodegen - ref (reserved word) cannot be used as model name. Renamed to ModelRef

I might have noticed this problem earlier if this little note was present in the documentation. The only reason I'm sending a PR for a 4 year old spec is to perhaps some day save a fellow community member from my pain.

I have no idea if the wording is correct and all, I tried to stay close to the rest of the document, but I just really want to go to bed. In case this gets rejected for being "too old", I hope this PR will at least show up if somebody Googles this error in the future.

…2 spec

It's 3 am. This could've saved me a lot of hours.
@darrelmiller
Copy link
Member

Sorry for your pain. We don't usually update old specifications. We currently don't have any notion of Errata. We will discuss this in the TSC meeting today.

@karenetheridge
Copy link
Member

Is there a similar update that could be made to a more recent document or is this item no longer relevant in the new spec?

@darrelmiller
Copy link
Member

The current spec is sufficiently different that these changes are not applicable.

@HoldYourWaffle HoldYourWaffle deleted the patch-1 branch May 27, 2023 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants