-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fix image links and rest refman #1116
Fix image links and rest refman #1116
Conversation
@@ -100,7 +100,7 @@ def get_property_type(property_desc, from_schemas): | |||
if dest_path in enterprise_paths: | |||
file.write(Setup.ENTERPRISE_BANNER) | |||
file.write(f"{dest_path_desc}\n\n") | |||
self.navigation += f"- \"Paths for {dest_path}\": {REST_REF_DIR_PATH}/apis_{dest_path}.md\n" | |||
self.navigation += f'- "Paths for {dest_path}": refmans/reference_rest/apis_{dest_path}.md\n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you use the REST_REF_DIR_PATH variable? What is the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the error. I cannot use REST_REF_DIR_PATH as it is the absolute path to the file and the goal here is to use the relative path for the navigation
file.write(f'<div><h4 style="display: inline-block;">Request body:</h4>\n') | ||
schema = request_body["content"]["application/json"]["schema"]["$ref"] | ||
file.write( | ||
f'<div><h4 style="display: inline-block;">Request body:</h4>\n' | ||
) | ||
schema = request_body["content"]["application/json"]["schema"][ | ||
"$ref" | ||
] | ||
schema = schema[schema.rfind("/") + 1 :] | ||
file.write(f'<span><a href="schemas.md#{schema.lower()}">{schema}</a></div>\n\n') | ||
file.write( | ||
f'<span><a href="schemas.md#{schema.lower()}">{schema}</a></div>\n\n' | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe your automatic formatting is incorrect. Can you check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using Black to format the code. What do I have to do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
Resolves: #1114
There was an error in how the Rest Refman was generated. I fixed the issue by not using the absolute path.