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

Fix image links and rest refman #1116

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

FlorianJacta
Copy link
Member

@FlorianJacta FlorianJacta commented Sep 9, 2024

Resolves: #1114

There was an error in how the Rest Refman was generated. I fixed the issue by not using the absolute path.

image

image

@@ -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'
Copy link
Member

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?

Copy link
Member Author

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

Comment on lines -125 to +134
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'
)
Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Member

@FabienLelaquais FabienLelaquais left a comment

Choose a reason for hiding this comment

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

👌

@FlorianJacta FlorianJacta merged commit b32e775 into develop Sep 9, 2024
1 check passed
@FlorianJacta FlorianJacta deleted the doc/#1114-fix-image-links-and-rest-refman branch September 9, 2024 15:49
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.

BUG-Missing images in Extension documentation
3 participants