Skip to content

docs: add /api/publish endpoint to Swagger API documentation - #269

Open
Gitjay11 wants to merge 1 commit into
dbpedia:masterfrom
Gitjay11:fix/issue-255-document-api-publish-endpoint
Open

docs: add /api/publish endpoint to Swagger API documentation#269
Gitjay11 wants to merge 1 commit into
dbpedia:masterfrom
Gitjay11:fix/issue-255-document-api-publish-endpoint

Conversation

@Gitjay11

@Gitjay11 Gitjay11 commented Jul 17, 2026

Copy link
Copy Markdown

Summary

Closes #255

The /api/publish endpoint was already implemented and fully functional in the server, but was completely absent from the Swagger API documentation at /api/#/, making it invisible and undiscoverable for users.

Root Cause

In server/app/api/routes/general.js, both routes are registered and point to the same internal handler:

router.post('/api/register', protector.protect(true), registerData);
router.post('/api/publish', protector.protect(true), registerData);  // ← was undocumented

Summary by CodeRabbit

  • New Features
    • Added API documentation for the /api/publish endpoint.
    • Documented support for RDF JSON-LD metadata, query parameters, and accepted response formats.
    • Added examples for successful and forbidden responses.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b3ac6f1c-125d-4533-b708-05f1f668e99a

📥 Commits

Reviewing files that changed from the base of the PR and between 2c775e7 and c04aef7.

📒 Files selected for processing (1)
  • server/app/api/swagger.yml

📝 Walkthrough

Walkthrough

The OpenAPI specification adds documentation for POST /api/publish, including its alias relationship to /api/register, query parameters, RDF JSON-LD request body, and success and forbidden response examples.

Changes

Publish API

Layer / File(s) Summary
Document publish endpoint
server/app/api/swagger.yml
Adds the publish operation for POST /api/publish, documenting its parameters, RDF JSON-LD request format, and 200 and 403 response examples.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes adding the /api/publish Swagger documentation.
Linked Issues check ✅ Passed The PR documents the missing /api/publish operation in Swagger, matching issue #255's request.
Out of Scope Changes check ✅ Passed The change set appears limited to documenting the existing /api/publish endpoint and related examples.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

/api/publish API operation not found in the API documentation https://databus.dbpedia.org/api/#/

1 participant