Skip to content

Commit

Permalink
feat: add namespace to c++ (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
junhan87 committed Nov 9, 2022
1 parent 11232c9 commit 1968c42
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ function getDefaultRenderOptions(options, schemaName, jsonSchema) {
// eslint-disable-next-line sonarjs/no-small-switch
switch (options.quicktypeLanguage) {
case SUPPORTED_LANGUAGES.csharp:
case SUPPORTED_LANGUAGES.cplusplus:
//Each schema require custom namespace and not common since otherwise schema names will clash.
if (!renderOptions.namespace) {
renderOptions.namespace = `${pascalCase(schemaName)}NameSpace`;
Expand Down

0 comments on commit 1968c42

Please sign in to comment.