Skip to content

Update API Docs #4344

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 8 commits into from
Jul 5, 2023
Merged

Conversation

devdot
Copy link
Contributor

@devdot devdot commented Jun 26, 2023

I came across a few minor issues in the API documentation.

(1) In the example response for read shelf/book, the tags have id - but they do not have id just like at any other endpoint.

(2) In the example response for read book, the page within contents does not have a type - but a quick test on the demo shows that any object within contents has a type.

I also noticed some fields are missing in the example responses, e.g. pages have an editor field (and sometimes url) and users within entities also a slug besides name and id. I assume it's an unnecessary bloat of the example responses to add those?

devdot added 2 commits June 26, 2023 10:13
Type is always returned when pages/chapters are in a contents array.
@devdot devdot marked this pull request as ready for review June 26, 2023 08:30
@ssddanbrown
Copy link
Member

Thanks @devdot!

I also noticed some fields are missing in the example responses, e.g. pages have an editor field (and sometimes url) and users within entities also a slug besides name and id. I assume it's an unnecessary bloat of the example responses to add those?

If it's just singular odd fields missing that are currently being provided in API responses, then it's probably not due to bloat, but instead there have been more recent changes, after responses were recorded, what have tangentially affected those old endpoints. Ideally those responses would correctly reflect all fields.

@devdot
Copy link
Contributor Author

devdot commented Jun 30, 2023

I've gone through the example responses and made them match the actual responses as I worked through them for a project I'm working on.

One potential issue I found is that chapters create does not return book_slug, even though all other chapters endpoints do return that value. Adding that should be trivial, but it's not in the scope of this PR.

@ssddanbrown ssddanbrown added this to the v23.06.1 milestone Jul 5, 2023
@ssddanbrown
Copy link
Member

Thank you very much for these updates @devdot!

@ssddanbrown ssddanbrown merged commit e04a1af into BookStackApp:development Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants