LazyStack

PetStoreSchema C# project

  • Interface Schema Classes generated by NSwag.

LazyStack uses NSwag to generate client and server side libraries. NSwag generates a single file with the client api classes and schema type classes in it. LazyStack separates these classes and places the api classes in the ClientSDK and the schema type classes in the Schema project. Both the client and server reference the schema project; this guarantees the client and server always use the same schema type definition and promote code reuse through libraries used in client and server.

It is not unusual for the client and/or server to have their own additional schema definitions. These client specific and server specific schema types should not be included in the Schema project as they are not part of the OpenApi specification.