Skip to content

feat: Add OpenAPI documentation for API endpoints#39

Merged
andrewtavis merged 7 commits into
scribe-org:mainfrom
DeleMike:feat/set-up-docs
Jul 23, 2025
Merged

feat: Add OpenAPI documentation for API endpoints#39
andrewtavis merged 7 commits into
scribe-org:mainfrom
DeleMike:feat/set-up-docs

Conversation

@DeleMike
Copy link
Copy Markdown
Collaborator

Contributor checklist

  • This pull request is on a separate branch and not the main branch
  • I have ran the ./pre-commit executable as well as make lint and have fixed all reported issues

Description

Adds OpenAPI documentation to Scribe-Server, making it easier for developers to understand and integrate with our language data API.

How to test

  • Install the Swagger CLI tool (one-time setup):
go install github.com/swaggo/swag/cmd/swag@latest
  • Generate docs and run the server:
make docs    # Generate OpenAPI documentation
make dev     # Start development server

Related issue

@github-actions
Copy link
Copy Markdown

ghost commented Jul 20, 2025

Thank you for the pull request! ❤️

The Scribe-Server team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest that you use the Element client as well as Element X for a mobile app, and definitely join the General and Data rooms once you're in. Also consider attending our bi-weekly Saturday dev syncs. It'd be great to meet you 😊

@github-actions
Copy link
Copy Markdown

ghost commented Jul 20, 2025

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)
  • The continuous integration (CI) workflows within the PR checks do not indicate new errors in the files changed

@axif0 axif0 requested review from andrewtavis and axif0 and removed request for axif0 July 20, 2025 20:25
@andrewtavis
Copy link
Copy Markdown
Member

Hey @DeleMike 👋 I did the commands listed to make the docs and it's not working 🤔 Commands are:

>> make docs
Generating API documentation...
swag is not installed. Please run 'make install-tools' first.
make: *** [docs] Error 1
>> go install github.com/swaggo/swag/cmd/swag@latest
# Succeeds
>> make docs
Generating API documentation...
swag is not installed. Please run 'make install-tools' first.
make: *** [docs] Error 1
>> make install-tools
# Succeeds
>> make docs
Generating API documentation...
swag is not installed. Please run 'make install-tools' first.
make: *** [docs] Error 1

Note that there are some commits above that edit the markdown files to add in directions for generating the docs. Let's remember to update those with the necessary steps!

@DeleMike
Copy link
Copy Markdown
Collaborator Author

Thanks for the review @andrewtavis!

This is strange. I will check it out, and I will update the docs if necessary.

@DeleMike
Copy link
Copy Markdown
Collaborator Author

Hi @andrewtavis and @axif0 can you please test this if it works. It is hard for me to reproduce the bug, so I tried to make it work by ensuring that we use the SYSTEM Go's path instead of making it relative.

Looking forward to your reviews!

@axif0
Copy link
Copy Markdown
Member

axif0 commented Jul 21, 2025

Now I can make and run the routes -

http://localhost:8080/swagger/index.html
image

A question is that don't we also need to remove unnecessary library like sqlc library from installing? @DeleMike ~
image

@DeleMike
Copy link
Copy Markdown
Collaborator Author

Thanks for the feedback 🚀🔥

Okay, I will remove unnecessary libraries. Thanks for pointing me towards that!

@andrewtavis
Copy link
Copy Markdown
Member

Thanks, @axif0 and @DeleMike! Let's also add http://localhost:8080/swagger/index.html to the docs so the user knows where to find them :)

@DeleMike
Copy link
Copy Markdown
Collaborator Author

Thanks, @axif0 and @DeleMike! Let's also add http://localhost:8080/swagger/index.html to the docs so the user knows where to find them :)

Sure! Thanks 😊

@DeleMike
Copy link
Copy Markdown
Collaborator Author

Hi @andrewtavis and @axif0, I've updated the PR.
I improved the docs and also removed unnecessary libraries

Copy link
Copy Markdown
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

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

All's working great, @DeleMike! So amazing that the service is getting to a point where it's so well rounded! Really is getting there for an initial release 😊

@andrewtavis andrewtavis merged commit 7e3080f into scribe-org:main Jul 23, 2025
2 checks passed
@DeleMike
Copy link
Copy Markdown
Collaborator Author

Thank you so much! Can't wait for the official release! ✨🚀

@DeleMike DeleMike deleted the feat/set-up-docs branch July 24, 2025 05:38
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.

Setup user-facing documentation for the API

3 participants