Skip to content

Building Locally

dginty4 edited this page Sep 9, 2024 · 8 revisions
  1. Set up openapi-generator
    1. Clone https://github.com/purecloudlabs/openapi-generator
    2. In the openapi-generator directory,
    3. install the java jdk and ensure the JAVA_HOME environment variable is set
    4. install maven and ensure the MAVEN_HOME environment variable is set
    5. run mvn clean package
  2. Clone https://github.com/MyPureCloud/platform-client-sdk-common
  3. Create/edit template files
    1. base templates are here: https://github.com/purecloudlabs/openapi-generator/tree/master/modules/openapi-generator/src/main/resources
    2. overrides for those templates go in resources/sdk/{language}/templates
  4. Create/edit config files
    1. the config file can be edited if needed but the localconfig allows overrides for most properties
    2. a localconfig will likely be needed (see https://github.com/purecloudlabs/platform-client-sdk-common/wiki/Local-Config-File-Samples)
    3. ensure either the config or localconfig have the correct jarPath for the swaggerCodegen or the WORKSPACE environment variable is set correctly in the localconfig
  5. To build an sdk and run unit tests,
    1. run npm install
    2. tsx sdkBuilder.ts --sdk {language}.
      1. {language} options are the folder names located in /resources/sdk/
    3. Run tsx sdkBuilder.ts to see CLI options.
Clone this wiki locally