Generate types for your app
The polywrap
CLI's codegen
command interacts with
an App Manifest to automatically generate wrapper types in the language of your application.
#
App Manifest contentThe App Manifest contains the name of the project, the programming language used to write it, and the location of the wrapper schema that states which code to generate. It can optionally contain an array of URI Redirects.
- Schema
- Example
#
Wrapper Schema for appsTo automatically generate types for an application or test suite, we must tell the Polywrap CLI which types to generate. This is done using a Wrapper Schema.
In your wrapper schema, you can add an import statement for each wrapper you're using in your project.
You can use the *
syntax to import a wrapper's module and all of its types, or you can list the types you'd like to use.
Learn more about schema imports at Wrapper Schema.