Skip to content

Change default inline object name #2569

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

Merged
merged 3 commits into from
Apr 4, 2019
Merged

Change default inline object name #2569

merged 3 commits into from
Apr 4, 2019

Conversation

Zomzog
Copy link
Contributor

@Zomzog Zomzog commented Apr 1, 2019

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Default name changed for more usable one. For #2516

@wing328
@jimschubert
@cbornet
@ackintosh
@jmini

@wing328
Copy link
Member

wing328 commented Apr 2, 2019

@Zomzog Thanks for the PR. I agree InlineObject is better than what we've right now.

May I suggest we also revise the warning message as follows?

LOGGER.warn("Found an inline schema without the `title` attribute. Default the model name to InlineObject instead. To have better control of the model naming, define the model separately so that it can be reused through out the spec.");

@Zomzog
Copy link
Contributor Author

Zomzog commented Apr 2, 2019

Good idea, I've updated the warning message.

key = "NULL_UNIQUE_NAME";
LOGGER.warn("null key found. Default to NULL_UNIQUE_NAME");
key = "InlineObject";
LOGGER.warn("Found an inline schema without the `title` attribute. Default the model name to InlineObject instead. To have better control of the model naming, define the model separately so that it can be reused through out the spec.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry please make one more minor change
through out => throughout (one word)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

@wing328
Copy link
Member

wing328 commented Apr 4, 2019

The CI failures is not caused by this change.

@wing328 wing328 merged commit b7b68ce into OpenAPITools:master Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants