Skip to content
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

MODLD-602: Updated TitleFieldRequest & TitleFieldResponse to avoid oneOf at the top level #57

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

pkjacob
Copy link
Contributor

@pkjacob pkjacob commented Nov 22, 2024

Problem:

When oneOf is at the top level (as in TitleFieldRequest.json), then you have to give the full path in ref element in line 10, 21 & 32. If relative path is used, maven openapi plugin will fail. This problem do not occur if allOf is in the top level as in this file. So, I believe it is a bug in the plugin.

However, if you give full path, then the python script used by jenkins to generate api-doc will fail with error Error: Invalid JSON pointer: schema/resource/common/title/PrimaryTitle.json. See this failed build (build is shown Green even though it actually failed). Expand "Do api-doc" to see the failure.

Fix given in this ticket:
I rearranged the JSON schemas so that "oneOf" element do not appear in the top level. This way, we can give relative paths in "$ref" element. This will make the python script & mvn clean install pass. See this java doc generation using this branch.

@pkjacob pkjacob changed the title MODLD-602: Updated TitleFieldResponse to avoid oneOf at the top level MODLD-602: Updated TitleFieldRequest & TitleFieldResponse to avoid oneOf at the top level Nov 22, 2024
@pkjacob pkjacob merged commit 2fbcc74 into master Nov 25, 2024
8 checks passed
@pkjacob pkjacob deleted the pjacob/MODLD-602_2 branch January 10, 2025 13:26
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