baljinnyamday / xyp-sdk
Typed PHP SDK for XYP (ХУР), Mongolia's government data exchange system
Requires
- php: ^8.2
- ext-curl: *
- ext-libxml: *
- ext-openssl: *
- ext-xmlreader: *
- psr/log: ^1.1 || ^2.0 || ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: 3.95.27
- guzzlehttp/psr7: ^2.7
- phpstan/phpstan: 2.2.14
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^11.5
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
Suggests
- psr/http-client: To send requests through your own PSR-18 client (Guzzle, Symfony HttpClient) with Xyp\Http\Psr18Transport
- psr/http-factory: Required by Xyp\Http\Psr18Transport
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-22 23:19:11 UTC
README
SDKs for XYP (ХУР), Mongolia's government data exchange system, generated from one description of the API so every language exposes the same services.
| Language | Package | Status |
|---|---|---|
| Python | packages/python — pip install "xyp>=0.1.0a2" |
alpha |
| TypeScript / Node.js | packages/typescript — npm install xyp-sdk@alpha |
alpha |
| Go | packages/go — go get github.com/baljinnyamday/xyp-sdk/packages/go@v0.1.0-alpha.1 |
alpha |
| PHP | packages/php — composer require baljinnyamday/xyp-sdk:0.1.0-alpha.1 |
alpha |
| Java | packages/java |
planned |
Unofficial: this project is not affiliated with the National Data Center or E-Mongolia Academy.
How it fits together
spec/services.json the service catalog, fetched from developer.xyp.gov.mn
spec/wsdl/*.wsdl WSDLs we have copies of (authoritative for request types)
│
generator/ spec -> clean, language-neutral model -> code per language
│
packages/<language> small hand-written core + generated models and services
- Update the catalog:
uv run spec/fetch_spec.py - Regenerate:
cd generator && uv run xyp-generate - Never edit generated files (Python:
operations/,services/,models/,_groups.py,_operations.py; TypeScript:src/operations/,src/services/,src/types/,src/groups.ts,src/registry.ts; Go:xyp/registry.goand everyxyp/<group>/package; PHP:src/Registry.php,src/ServiceGroups.phpand everysrc/<Group>/directory); change the generator or the spec.
XYP publishes SOAP WSDLs only inside its VPN, and its responses are typed
xs:anyType, so the public portal catalog is the only description of what
services return. That catalog is typed by hand and the generator's
normalize.py documents every irregularity it has to clean up.
The PHP package's composer.json sits at the repository root, because Packagist
only reads packages from there; .gitattributes keeps everything but
packages/php/src and its certificates out of what composer require downloads.
See docs/tls.md for why the SDKs verify TLS against bundled national CA certificates instead of turning verification off.
License
MIT