Skip to content

feat: wire the PMFBY grievance plugin into quick-start - #78

Open
nisargabd wants to merge 7 commits into
developmentfrom
feat/57-pmfby-mock-and-registry-seed
Open

nisargabd wants to merge 7 commits into
developmentfrom
feat/57-pmfby-mock-and-registry-seed

Conversation

@nisargabd

@nisargabd nisargabd commented Oct 12, 2026 •

Copy link
Copy Markdown

What

Sets up quick-start to run the PMFBY grievance plugin (OpenAgriNet/network-adapter#70), and adds a mock of the PMFBY portal.

  • Registry seed (setup.py): adds the PMFBY participant, its binding with two actions (support, status), and the openagrinet:Grievance schema row. support is never retried, so a retry cannot file a duplicate grievance.
  • Schema row: the Grievance pack lives under api-schemas/ on api-schema-packs-v0.1, so setup.py and SchemaRegistry.json (quick-start and chart) now accept that path.
  • Mappings: grievance.support.yaml and grievance.status.yaml added under config/mappings/pmfby/, next to the other capabilities' mappings.
  • Provider adapter config: the Grievance step, logging in at NICUsersLogin and keeping the token until the login reply's validTo.
  • Consumer routing: routes support to the provider adapter.
  • .env.example and docker-compose.yml: the PMFBY values, the login passed to the provider adapter, and a mock-pmfby service. make up builds and starts it.
  • Mock (mock-server/mockpmfby): answers like the demo portal (same replies and refusal messages, one ticket per application). A status read needs the ticket's own number and phone; otherwise it answers "No record found".

Why

The grievance plugin needs the registry to hold PMFBY's binding and schema, the adapters to route and serve the call, and its mappings published where the registry points. The mock lets the flow run without PMFBY credentials.

Testing

Ran the Postman collection (publish, discover, support, status) through the adapters against the mock: 42 requests, 129 assertions, all pass. Also checked a fresh lodge, a repeat lodge, and status with a wrong ticket or phone (400). The Grievance schema URL built by setup.py passes the registry's pattern and resolves. setup.py itself was not run, since registry writes are permanent.

Merge order

Merge OpenAgriNet/network-adapter#70 first: the provider adapter needs its Grievance plugin.

Part of OpenAgriNet/network-adapter#57

…etwork-adapter#57]

Adds the Grievance step and support route, the PMFBY registry seed with its two actions, and a mock that copies the PMFBY demo portal.
@nisargabd
nisargabd force-pushed the feat/57-pmfby-mock-and-registry-seed branch from b04e9e3 to 7efce84 Compare October 12, 2026 11:00
@nisargabd nisargabd changed the title feat: wire the PMFBY grievance plugin into quick-start and the charts feat: wire the PMFBY grievance plugin into quick-start Oct 12, 2026
…penAgriNet/network-adapter#57]

The Grievance pack lives under api-schemas/ on api-schema-packs-v0.1, not schema/ on main, so the registry pattern now accepts that folder and a dotted ref.
…t/network-adapter#57]

The other capabilities' mappings are served from this folder; PMFBY's now sit beside them.
…t/network-adapter#57]

The plugin reads the token lifetime from the login reply, so a fixed tokenTtl is no longer needed.
…penAgriNet/network-adapter#57]

The status mapping only reads an RFC 3339 InsertDateTime, so the mock's reads had no filedOn. The seed ticket is now the demo's current one.
…penAgriNet/network-adapter#57]

A status read now needs the ticket's own number and phone, so a wrong ticket gets no record. mock-pmfby is built from source and started by make up.
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