Skip to content

Proof of Concept - Added Structured JSON API Endpoint to be used by Flutter App#766

Open
SantamRC wants to merge 1 commit intoCircuitVerse:masterfrom
SantamRC:flutter-api
Open

Proof of Concept - Added Structured JSON API Endpoint to be used by Flutter App#766
SantamRC wants to merge 1 commit intoCircuitVerse:masterfrom
SantamRC:flutter-api

Conversation

@SantamRC
Copy link

@SantamRC SantamRC commented Mar 12, 2026

Changes done:

  • Added New Endpoints in IB API to be used by Flutter App

New Endpoints

http://localhost:4000/api-mobile/pages/docs/binary-representation/index.json
http://localhost:4000/api-mobile/pages/docs/binary-representation/binary-numbers.json

Preview Link(s):

✅️ By submitting this PR, I have verified the following

  • Checked to see if a similar PR has already been opened 🤔️
  • Reviewed the contributing guidelines 🔍️
  • Sample preview link added (add the link(s) for all the pages changed/updated from the checks tab after checks complete)
  • Tried Squashing the commits into one

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Walkthrough

This pull request modifies the Jekyll site configuration and introduces API documentation content for the mobile API. The _config.yml file is updated to include the api-mobile directory in the build process. Three new JSON documentation files are added under api-mobile/pages/docs/ covering binary algebra and binary representation topics. These files define structured metadata, content sections, examples, tables, interactive elements, and quiz questions. The additions establish the foundational documentation structure for binary-related concepts within the API mobile documentation system.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding structured JSON API endpoints for a Flutter app, which is reflected in the four new files (_config.yml modification and three JSON API endpoint files).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan for PR comments
  • Generate coding plan

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 04782071-ba43-4fa4-886c-093b282cda36

📥 Commits

Reviewing files that changed from the base of the PR and between ac91c0a and 8c12e22.

📒 Files selected for processing (4)
  • _config.yml
  • api-mobile/pages/docs/binary-algebra/addition.json
  • api-mobile/pages/docs/binary-representation/binary-numbers.json
  • api-mobile/pages/docs/binary-representation/index.json

Comment on lines +2 to +7
"id": "addition",
"title": "Addition",
"heading": "This is Addition for Flutter",
"api_endpoints": {
"self": "/api-mobile/pages/docs/binary-algebra/addition.json"
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Complete the child-page schema before exposing this endpoint.

This payload is missing the fields that sibling child pages already carry (parent, has_children, path, and a parent API link, as seen in api-mobile/pages/docs/binary-representation/binary-numbers.json). That makes addition.json an outlier for the Flutter client and leaves it without enough metadata for routing/breadcrumbs.

"title": "Binary Numbers",
"nav_order": "l0s000",
"level": "basic",
"parent": "Binary representation",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Make parent match the chapter title exactly.

This page uses "Binary representation", but api-mobile/pages/docs/binary-representation/index.json is titled "Binary Representation". If parent lookup is case-sensitive, this child will not bind to its chapter.

Comment on lines +60 to +62
"api_endpoints": {
"self": "/api-mobile/pages/docs/binary-representation/index.json",
"children": "/api-mobile/pages/docs/binary-representation/"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's look at the file structure and the specific file
find api-mobile/pages/docs/binary-representation -type f | head -20

Repository: CircuitVerse/Interactive-Book

Length of output: 191


🏁 Script executed:

# Check if there's an index.json in the children directory
ls -la api-mobile/pages/docs/binary-representation/

Repository: CircuitVerse/Interactive-Book

Length of output: 313


🏁 Script executed:

# Look at the content of the file in question to understand the full context
cat -n api-mobile/pages/docs/binary-representation/index.json

Repository: CircuitVerse/Interactive-Book

Length of output: 2282


🏁 Script executed:

# Search for similar api_endpoints patterns to understand the convention
rg "api_endpoints" --type json -A 3 | head -100

Repository: CircuitVerse/Interactive-Book

Length of output: 1188


🏁 Script executed:

# Search for all api_endpoints patterns to understand the convention better
rg "api_endpoints" --type json -B 2 -A 5 | head -150

Repository: CircuitVerse/Interactive-Book

Length of output: 1741


🏁 Script executed:

# Look for other parent files with children to see the pattern
rg '"has_children":\s*true' --type json -l

Repository: CircuitVerse/Interactive-Book

Length of output: 127


🏁 Script executed:

# Check if there are other children endpoints and how they're structured
rg '"children":\s*"/' --type json

Repository: CircuitVerse/Interactive-Book

Length of output: 191


Make the children endpoint a concrete JSON file reference.

The children endpoint points to /api-mobile/pages/docs/binary-representation/, a directory URL, which is inconsistent with the rest of the API. The self endpoint (and all parent endpoints in child files) correctly reference concrete .json files. On a static site, directory URL resolution is server-dependent and fragile. Either point children to a manifest file like /api-mobile/pages/docs/binary-representation/children.json, or if the embedded children array is sufficient, remove the endpoint.

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.

1 participant