Features/waterbody api fix#862
Open
kapildadheech wants to merge 5 commits intostagingfrom
Open
Conversation
Unify public and waterrejuvenation API outputs to use status/error_message/data, update Swagger/ReDoc examples to match runtime responses, and add optional MongoDB caching with file-cache fallback plus regenerate support for waterbody endpoints
MongoDB setup instructions (for README/PR)
Start MongoDB (Docker)
docker run -d --name corestack-mongo -p 27017:27017 -v mongo_data:/data/db mongo:7
Add env vars
MONGODB_URI=mongodb://localhost:27017
MONGODB_DB_NAME=core_stack
MONGODB_WATERBODIES_COLLECTION=waterbodies_cache
Install Python dependency in app env
pip install pymongo
Restart Django server
Test cache write
Call:
/api/v1/get_waterbodies_data_by_admin/?state=Rajasthan&district=bhilwara&block=mandalgarh
Verify in Mongo:
docker exec corestack-mongo mongosh --quiet --eval "db.getSiblingDB('core_stack').waterbodies_cache.countDocuments({})"
Force refresh endpoint output (optional)
Add query param: regenerate=true
Add SWB5 processing module, introduce API v2 URL surface, standardize Open-Meteo-style response envelopes, add Mongo caching for public v2 MWS data, and enforce two-decimal JSON rendering across API responses. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.