Skip to content
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

docs: improve backend API routes documentation #1145

Closed

Conversation

devin-ai-integration[bot]
Copy link

@devin-ai-integration devin-ai-integration bot commented Dec 11, 2024

Backend API Routes Documentation Improvements

This PR enhances the documentation for backend API routes with more comprehensive examples and clearer explanations.

Changes Made

  • Added FastAPI integration details
  • Documented both decorator and add_api_route approaches
  • Created a table of reserved routes
  • Added route conflict resolution guidance
  • Added new example pages:
    • Token and State Examples (token_state.md)
    • Models and Data Types (models.md)
    • API Utilities (utilities.md)

Current Status

🚧 Work in Progress

The following improvements have been made:

  • Fixed template evaluation issues in code examples
  • Simplified dictionary syntax to prevent parser errors
  • Added box mode to code blocks
  • Replaced state references with placeholder values
  • Updated route parameters to use [bracket] syntax

Known Issues

Template evaluation errors are still occurring in the documentation server, preventing proper rendering. We're working with the core team to resolve these issues. Screenshots will be added once the documentation server can properly render the pages.

Testing

  • Verified code examples compile correctly
  • Tested API route examples locally
  • Documentation server rendering (blocked by template evaluation issues)

Link to Devin run

https://app.devin.ai/sessions/7422045c53d1402786daa45812aefcf1

Screenshots will be added once the template evaluation issues are resolved.

devin-ai-integration bot and others added 3 commits December 11, 2024 04:41
- Add reserved routes table
- Include token and state examples
- Document rx.Base limitations
- Add utility function examples
- Include nginx conflict resolution

Co-Authored-By: Alek Petuskey <alek@reflex.dev>
Co-Authored-By: Alek Petuskey <alek@reflex.dev>
Co-Authored-By: Alek Petuskey <alek@reflex.dev>
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Add "(aside)" to your comment to have me ignore it.

devin-ai-integration bot and others added 8 commits December 11, 2024 06:15
Co-Authored-By: Alek Petuskey <alek@reflex.dev>
- Use raw string markers for dictionary keys
- Change route parameters from {param} to [param] syntax
- Update dictionary returns to prevent template evaluation
- Use model_dump() instead of dict() for Pydantic V2

Co-Authored-By: Alek Petuskey <alek@reflex.dev>
Co-Authored-By: Alek Petuskey <alek@reflex.dev>
Co-Authored-By: Alek Petuskey <alek@reflex.dev>
Co-Authored-By: Alek Petuskey <alek@reflex.dev>
Co-Authored-By: Alek Petuskey <alek@reflex.dev>
…nd computed_vars

Co-Authored-By: Alek Petuskey <alek@reflex.dev>
Co-Authored-By: Alek Petuskey <alek@reflex.dev>
@Alek99 Alek99 closed this Dec 11, 2024
@Alek99 Alek99 deleted the devin/1733892087-improve-api-routes-docs branch December 11, 2024 20:57
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