Skip to content

This pull request introduces significant refactoring and cleanup of the API endpoints, focusing on the removal of unused routes, consolidation of product-related endpoints, and improvements to metadata returned by the API. #20

Merged
goldlabelapps merged 2 commits intomasterfrom
staging
Mar 23, 2026

Conversation

@goldlabelapps
Copy link
Copy Markdown
Owner

The main changes include deleting the deprecated /echo and /import-csv endpoints, moving the product reset and product list endpoints into a new module, and updating the structure of API responses for consistency.

API endpoint removals and consolidation:

  • Removed the unused /echo and /import-csv endpoints and their routers from the codebase, streamlining the API surface. [1] [2] [3]
  • Moved the product reset functionality and the /products endpoint into a new module app/api/products/reset.py, consolidating product-related logic. [1] [2] [3]

API response structure improvements:

  • Standardized the meta field in API responses by adding a "severity": "success" property and removing redundant or unused fields such as "description" and "message" in both the root and products endpoints. [1] [2] [3]
  • Updated the root and products endpoints to ensure the "title" field is present in the meta response for better clarity and consistency. [1] [2] [3] [4]

Project metadata and documentation:

  • Bumped the application version from 1.0.8 to 1.0.9 to reflect these changes.
  • Updated the main app docstring and the FastAPI title for improved clarity and branding. [1] [2]

Remove the 'description' and 'message' fields from the meta objects in the root and products endpoints and move the 'severity' key for consistent ordering. This standardizes the response meta payloads and removes redundant/static text (e.g., 'Welcome to NX AI!'); no other behavior changes were made.
Bump version to 1.0.9, remove legacy echo and CSV import endpoints, and add a new /products/reset endpoint that recreates and seeds the product table. Exports reset router from app.api.products and includes it in the central routes; also keep the products listing route that returns product data with enriched meta (version, base_url, timestamp). Update app metadata/title in main.py and adjust tests to validate the new meta structure.
@goldlabelapps goldlabelapps merged commit e380a4e into master Mar 23, 2026
2 checks passed
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