Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryanleecode/xsd-to-typescript-converter
Converter for XSD Definitions to Typescript Types and Interfaces
https://github.com/ryanleecode/xsd-to-typescript-converter
cmake conan converter cpp typescript xsd
Last synced: 4 days ago
JSON representation
Converter for XSD Definitions to Typescript Types and Interfaces
- Host: GitHub
- URL: https://github.com/ryanleecode/xsd-to-typescript-converter
- Owner: ryanleecode
- License: mit
- Created: 2018-09-29T15:59:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-13T02:06:31.000Z (about 6 years ago)
- Last Synced: 2024-11-10T07:44:37.260Z (2 months ago)
- Topics: cmake, conan, converter, cpp, typescript, xsd
- Language: C++
- Homepage:
- Size: 143 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XSD To Typescript Converter
XSD to Typescript converter is a tool that converts XSD type definitions into Typescript _types_ and _interface_ definitions.
## Setup
### Prerequisites
#### Conan
1. Install the [conan](https://docs.conan.io/en/latest/installation.html) package manager.
2. Add the following sources to your conan remotes```
conan remote add conan-center https://conan.bintray.com
conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
conan remote add fruit https://api.bintray.com/conan/google/fruit
```#### CMake
1. Install any version of [CMake](https://cmake.org/download/) >= **3.1**
#### XSD Files
Create an XSD file with the name `Elements.xsd` and drop it in `/src`. An example file is provided [here](SampleXSD.xml).
## Building
```
cd srcconan install . -s build_type=Debug --install-folder=cmake-build-debug --build missing -s compiler.libcxx=libstdc++11
cd cmake-build-debug
cmake ../
make
```## Running
```
cd /src/cmake-build-debug/bin/
./xsdtotypescript
```The generated Typescript types will appear in `std::out`
## Tests
```
cd /src/cmake-build-debug/bin/
./tsgen_test
./util_test
./xmlparse_test
```## Roadmap
- [ ] CLI Support
- [ ] Glob Support
- [ ] NPM Package- [ ] XSD Simple Type
- [ ] String Type
- [x] Basic
- [x] Enumeration
- [ ] Pattern
- [x] Decimal Type
- [ ] Integer Type
- [x] Basic
- [ ] Enumeration
- [ ] Min/Max Inclusive
- [ ] Pattern
- [x] DateTime Type
- [x] XSD Complex Type
- [ ] Optional
- [x] Basic
- [ ] All Type
- [x] XSD Sequence Type
- [x] XSD Element Type