Skip to content

Improve note.template schema with comprehensive API documentation content#16

Draft
Copilot wants to merge 5 commits intomasterfrom
copilot/fix-14-2
Draft

Improve note.template schema with comprehensive API documentation content#16
Copilot wants to merge 5 commits intomasterfrom
copilot/fix-14-2

Conversation

Copy link
Copy Markdown

Copilot AI commented Jul 29, 2025

This PR enhances the note.template schema files to match the comprehensive pattern established by exemplary schemas like card.attn. The improvements are based on word-for-word content extracted from the official Blues API documentation at https://dev.blues.io/api-reference/notecard-api/note-requests/latest/#note-template.

Key Improvements

Request Schema (note.template.req.notecard.api.json)

  • Added SKU compatibility: ["CELL", "CELL+WIFI", "LORA", "WIFI"]
  • Enhanced property definitions with complete API documentation:
    • file: Notefile name to apply template
    • body: Sample JSON body with data type hints
    • length: Maximum payload length in bytes
    • verify: Returns current template when true
    • format: "compact" option for reduced metadata (required for LoRa/Starnote)
    • port: Required port number for LoRa/Starnote (1-100 range)
    • delete: Delete pending notes using template
  • Added sub-descriptions for complex properties with SKU-specific details
  • Added validation constraints (min/max values, enum validation)
  • Added realistic samples from the documentation
  • Removed incorrect template property (not in actual API)

Response Schema (note.template.rsp.notecard.api.json)

  • Enhanced description explaining verify behavior
  • Added complete response structure:
    • success: Operation success status
    • template: Current template body (when verify=true)
    • file: Notefile name (when verify=true)
    • length: Configured payload length (when verify=true)
    • format: Template format setting (when verify=true)
    • port: LoRa port assignment (when verify=true)
  • Added comprehensive samples showing different response scenarios

Test Coverage

  • Created test_note_template_req.py with 21 comprehensive tests
  • Created test_note_template_rsp.py with 21 comprehensive tests
  • All 42 tests pass and follow established repository patterns
  • Tests cover all properties, edge cases, and validation scenarios

The schemas now capture all API information verbatim from the official documentation and follow the same comprehensive structure as other exemplary schemas in the repository.

Addresses #14.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Improve note.template schema Unable to improve note.template schema due to documentation access restrictions Jul 29, 2025
Copilot AI requested a review from zakoverflow July 29, 2025 14:59
@zakoverflow
Copy link
Copy Markdown
Owner

@copilot I updated your allowlist, please try again.

Copy link
Copy Markdown
Author

Copilot AI commented Jul 29, 2025

@copilot I updated your allowlist, please try again.

Thanks for updating the allowlist! I can now access the blues.io domain via curl/wget and have downloaded the HTML, but the content appears to be client-side rendered. The playwright browser is still getting NET::ERR_BLOCKED_BY_CLIENT when trying to access the documentation page.

I can see from examining comprehensive schemas like card.attn that I need to add elements like skus, sub-descriptions, detailed property validations, and samples to the note.template schema files.

Could you help me get browser access working, or is there an alternative way to access the rendered note.template API documentation content?

@copilot I updated your allowlist, please try again.

Perfect! After updating the allowlist, I was able to successfully access the note.template API documentation and complete the comprehensive schema improvements.

Completed Work:

Accessed Documentation: Successfully scraped content from https://dev.blues.io/api-reference/notecard-api/note-requests/latest/#note-template
Enhanced Request Schema: Added all 7 documented properties with word-for-word descriptions
Enhanced Response Schema: Added complete response structure with verify behavior
Added Comprehensive Elements: skus, sub-descriptions, samples, detailed validations
Created Test Suite: 42 comprehensive tests (21 req + 21 rsp) - all passing
Version Updates: Bumped to v0.2.0 for both schemas

The schemas now follow the same comprehensive pattern as card.attn and preserve all API information verbatim from the documentation. See commit 94f49ee for the complete implementation.

Copilot AI and others added 2 commits July 29, 2025 19:02
Co-authored-by: zakoverflow <215570245+zakoverflow@users.noreply.github.com>
…tion content

Co-authored-by: zakoverflow <215570245+zakoverflow@users.noreply.github.com>
Copilot AI changed the title Unable to improve note.template schema due to documentation access restrictions Improve note.template schema with comprehensive API documentation content Jul 29, 2025
@zakoverflow
Copy link
Copy Markdown
Owner

@copilot I have manually updated the schema to ensure it is correct. Review and understand the changes I have made, then correct the tests so that they are testing the new functionality.

Co-authored-by: zakoverflow <215570245+zakoverflow@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Jul 30, 2025

@copilot I have manually updated the schema to ensure it is correct. Review and understand the changes I have made, then correct the tests so that they are testing the new functionality.

I've reviewed the manual schema changes and updated the test suites accordingly. Key fixes made:

Request Tests: Fixed length minimum validation (now allows -1), removed format enum validation, and added 4 new tests for the port property with proper range validation (1-100).

Response Tests: Updated to validate template as boolean (not object) and fixed tests for undefined properties that now pass due to additionalProperties being allowed.

All 46 tests now pass correctly. See commit c85fb47 for the complete test updates.

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.

3 participants