Skip to content

Example of sharing DTO contracts defined in .NET with other languages

License

Notifications You must be signed in to change notification settings

crookm/cross-lang-dtos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cross language DTO sharing

Just an idea I had to share contracts defined in .NET with other languages, rust in this case. Quite similar to how OpenAPI/Swagger generated clients work.

Building the rust project with cargo will:

  1. Build the .NET contracts generator project (which produces the JSON schema files from the contracts project)
  2. Link the generated JSON schema files into its own local copy
  3. Generate a rust struct using schemafy
  4. Get some user input, and then print out the JSON of the hydrated DTO

About

Example of sharing DTO contracts defined in .NET with other languages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published