Repository: asyncapi/modelina
Pull request #221 (2021-06-03 09:42:23)

refactor: add post interpreter
**Description**
This PR introduces a post-interpreter that takes the CommonModel representation of the schema and splits up any models into separate ones. This makes the interpreter process cleaner.

**Related issue(s)**
fixes https://github.com/asyncapi/generator-model-sdk/issues/195

sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


coveralls: ## Pull Request Test Coverage Report for [Build 918229985](https://coveralls.io/builds/40397775)

* **68** of **68**   **(100.0%)**  changed or added relevant lines in **9** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage decreased (**-0.05%**) to **94.124%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/40397775/badge)](https://coveralls.io/builds/40397775) |
| :-- | --: |
| Change from base [Build 914916142](https://coveralls.io/builds/40361120): |  -0.05% |
| Covered Lines: | 1189 |
| Relevant Lines: | 1219 |

---
##### 💛  - [Coveralls](https://coveralls.io)

sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=asyncapi_generator-model-sdk&pullRequest=221&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='2.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list) [2.0% Duplication](https://sonarcloud.io/component_measures?id=asyncapi_generator-model-sdk&pullRequest=221&metric=new_duplicated_lines_density&view=list)


jonaslagoni: > More and more I don't understand "new" code 😅 I added some suggestions.

Hmm, it should not go in that direction!

What do you think is confusing about it? 
magicmatatjahu: @jonaslagoni Rather situation that I haven't been in the code for 2-3 months and I don't know exactly how it works underneath, so it's only a confusing for me.
jonaslagoni: > @jonaslagoni Rather situation that I haven't been in the code for 2-3 months and I don't know exactly how it works underneath, so it's only a confusing for me.

Fair enough, that's understandable 🙂 

Patch:
diff --git a/src/interpreter/InterpretAdditionalProperties.ts b/src/interpreter/InterpretAdditionalProperties.ts
index 142aa6d9..528d124b 100644
--- a/src/interpreter/InterpretAdditionalProperties.ts
+++ b/src/interpreter/InterpretAdditionalProperties.ts
@@ -13,8 +13,8 @@ import { isModelObject } from './Utils';
  */
 export default function interpretAdditionalProperties(schema: Schema, model: CommonModel, interpreter : Interpreter, interpreterOptions: InterpreterOptions = Interpreter.defaultInterpreterOptions): void {
   if (!isModelObject(model)) {return;}
-  const newModels = interpreter.interpret(schema.additionalProperties || true, interpreterOptions);
-  if (newModels.length > 0) {
-    model.addAdditionalProperty(newModels[0], schema);
+  const additionalPropertiesModel = interpreter.interpret(schema.additionalProperties || true, interpreterOptions);
+  if (additionalPropertiesModel !== undefined) {
+    model.addAdditionalProperty(additionalPropertiesModel, schema);
   }
 }
diff --git a/src/interpreter/InterpretAllOf.ts b/src/interpreter/InterpretAllOf.ts
index 5101923c..b6e0b02b 100644
--- a/src/interpreter/InterpretAllOf.ts
+++ b/src/interpreter/InterpretAllOf.ts
@@ -17,14 +17,13 @@ import { isModelObject } from './Utils';
 export default function interpretAllOf(schema: Schema, model: CommonModel, interpreter : Interpreter, interpreterOptions: InterpreterOptions = Interpreter.defaultInterpreterOptions): void {
   if (schema.allOf === undefined) {return;}
   for (const allOfSchema of schema.allOf) {  
-    const interpretedModels = interpreter.interpret(allOfSchema, interpreterOptions);
-    if (interpretedModels.length === 0) {continue;}
-    const interpretedModel = interpretedModels[0];
-    if (isModelObject(interpretedModel) && interpreterOptions.allowInheritance === true) {
-      Logger.info(`Processing allOf, inheritance is enabled, ${model.$id} inherits from ${interpretedModel.$id}`, model, interpretedModel);
-      model.addExtendedModel(interpretedModel);
+    const allOfModel = interpreter.interpret(allOfSchema, interpreterOptions);
+    if (allOfModel === undefined) {continue;}
+    if (isModelObject(allOfModel) && interpreterOptions.allowInheritance === true) {
+      Logger.info(`Processing allOf, inheritance is enabled, ${model.$id} inherits from ${allOfModel.$id}`, model, allOfModel);
+      model.addExtendedModel(allOfModel);
     } else {
-      Logger.info('Processing allOf, inheritance is not enabled. AllOf model is merged together with already interpreted model', model, interpretedModel);
+      Logger.info('Processing allOf, inheritance is not enabled. AllOf model is merged together with already interpreted model', model, allOfModel);
       interpreter.interpretAndCombineSchema(allOfSchema, model, schema, interpreterOptions);
     }
   }
diff --git a/src/interpreter/InterpretItems.ts b/src/interpreter/InterpretItems.ts
index 96b7a17d..f17080f3 100644
--- a/src/interpreter/InterpretItems.ts
+++ b/src/interpreter/InterpretItems.ts
@@ -30,14 +30,14 @@ function interpretArrayItems(rootSchema: Schema, itemSchemas: (Schema | boolean)
   if (Array.isArray(itemSchemas)) {
     for (const [index, itemSchema] of itemSchemas.entries()) {
       const itemModel = interpreter.interpret(itemSchema, interpreterOptions);
-      if (itemModel.length > 0) {
-        model.addItemTuple(itemModel[0], rootSchema, index);
+      if (itemModel !== undefined) {
+        model.addItemTuple(itemModel, rootSchema, index);
       }
     }
   } else {
-    const itemModels = interpreter.interpret(itemSchemas, interpreterOptions);
-    if (itemModels.length > 0) {
-      model.addItem(itemModels[0], rootSchema);
+    const itemModel = interpreter.interpret(itemSchemas, interpreterOptions);
+    if (itemModel !== undefined) {
+      model.addItem(itemModel, rootSchema);
     }
   }
 }
diff --git a/src/interpreter/InterpretNot.ts b/src/interpreter/InterpretNot.ts
index bd691eca..c86e0247 100644
--- a/src/interpreter/InterpretNot.ts
+++ b/src/interpreter/InterpretNot.ts
@@ -17,15 +17,13 @@ export default function interpretNot(schema: Schema, model: CommonModel, interpr
   if (typeof schema.not === 'object') {
     const notSchema = schema.not;
     const newInterpreterOptions: InterpreterOptions = {
-      ...interpreterOptions, 
-      splitModels: false,
+      ...interpreterOptions,
       allowInheritance: false
     };
-    const interpretedModels = interpreter.interpret(notSchema, newInterpreterOptions);
-    if (interpretedModels.length > 0) {
-      const interpretedModel = interpretedModels[0];
-      if (interpretedModel.type !== undefined) {model.removeType(interpretedModel.type);}
-      if (interpretedModel.enum !== undefined) {model.removeEnum(interpretedModel.enum);}
+    const notModel = interpreter.interpret(notSchema, newInterpreterOptions);
+    if (notModel !== undefined) {
+      if (notModel.type !== undefined) {model.removeType(notModel.type);}
+      if (notModel.enum !== undefined) {model.removeEnum(notModel.enum);}
     }
   } else if (typeof schema.not === 'boolean') {
     Logger.warn(`Encountered boolean not schema for model ${model.$id}. This schema are not applied!`, schema);
diff --git a/src/interpreter/InterpretPatternProperties.ts b/src/interpreter/InterpretPatternProperties.ts
index 9333715f..ba65c7b1 100644
--- a/src/interpreter/InterpretPatternProperties.ts
+++ b/src/interpreter/InterpretPatternProperties.ts
@@ -13,9 +13,9 @@ import { Interpreter, InterpreterOptions } from './Interpreter';
 export default function interpretPatternProperties(schema: Schema | boolean, model: CommonModel, interpreter : Interpreter, interpreterOptions: InterpreterOptions = Interpreter.defaultInterpreterOptions): void {
   if (typeof schema === 'boolean') {return;}
   for (const [pattern, patternSchema] of Object.entries(schema.patternProperties || {})) {
-    const newModels = interpreter.interpret(patternSchema, interpreterOptions);
-    if (newModels.length > 0) {
-      model.addPatternProperty(pattern, newModels[0], schema);
+    const patternModel = interpreter.interpret(patternSchema, interpreterOptions);
+    if (patternModel !== undefined) {
+      model.addPatternProperty(pattern, patternModel, schema);
     }
   }
 }
diff --git a/src/interpreter/InterpretProperties.ts b/src/interpreter/InterpretProperties.ts
index 8a56d8be..d074471c 100644
--- a/src/interpreter/InterpretProperties.ts
+++ b/src/interpreter/InterpretProperties.ts
@@ -15,9 +15,9 @@ export default function interpretProperties(schema: Schema, model: CommonModel,
   model.addTypes('object');
   
   for (const [propertyName, propertySchema] of Object.entries(schema.properties)) {
-    const propertyModels = interpreter.interpret(propertySchema, interpreterOptions);
-    if (propertyModels.length > 0) {
-      model.addProperty(propertyName, propertyModels[0], schema);
+    const propertyModel = interpreter.interpret(propertySchema, interpreterOptions);
+    if (propertyModel !== undefined) {
+      model.addProperty(propertyName, propertyModel, schema);
     }
   }
 }
diff --git a/src/interpreter/Interpreter.ts b/src/interpreter/Interpreter.ts
index 4dfe245d..8720d5fe 100644
--- a/src/interpreter/Interpreter.ts
+++ b/src/interpreter/Interpreter.ts
@@ -1,5 +1,5 @@
 import { CommonModel, Schema } from '../models';
-import { interpretName, isModelObject } from './Utils';
+import { interpretName } from './Utils';
 import interpretProperties from './InterpretProperties';
 import interpretAllOf from './InterpretAllOf';
 import interpretConst from './InterpretConst';
@@ -7,56 +7,41 @@ import interpretEnum from './InterpretEnum';
 import interpretAdditionalProperties from './InterpretAdditionalProperties';
 import interpretItems from './InterpretItems';
 import interpretPatternProperties from './InterpretPatternProperties';
-import { Logger } from '../utils';
 import interpretNot from './InterpretNot';
 
 export type InterpreterOptions = {
-  splitModels?: boolean,
   allowInheritance?: boolean
 } 
 export class Interpreter {
   static defaultInterpreterOptions: InterpreterOptions = {
-    splitModels: true,
     allowInheritance: false
   }
 
   private anonymCounter = 1;
   private seenSchemas: Map<Schema | boolean, CommonModel> = new Map();
-  private iteratedModels: Record<string, CommonModel> = {};
   
   /**
    * Transforms a schema into instances of CommonModel by processing all JSON Schema draft 7 keywords and infers the model definition.
-   *  
-   * length == 0 means no model can be generated from the schema
-   * Index 0 will always be the root schema CommonModel representation.
-   * Index > 0 will always be the separated models that the interpreter determines are fit to be on their own.
    * 
    * @param schema
    * @param interpreterOptions to control the interpret process
    */
-  interpret(schema: Schema | boolean, options: InterpreterOptions = Interpreter.defaultInterpreterOptions): CommonModel[] {
+  interpret(schema: Schema | boolean, options: InterpreterOptions = Interpreter.defaultInterpreterOptions): CommonModel | undefined {
     if (this.seenSchemas.has(schema)) {
       const cachedModel = this.seenSchemas.get(schema); 
       if (cachedModel !== undefined) {
-        return [cachedModel, ...Object.values(this.iteratedModels)];
+        return cachedModel;
       }
     }
     //If it is a false validation schema return no CommonModel
     if (schema === false) {
-      return [];
+      return undefined;
     } 
     const model = new CommonModel();
     model.originalSchema = Schema.toSchema(schema);
     this.seenSchemas.set(schema, model);
     this.interpretSchema(model, schema, options);
-    const modelsToReturn = Object.values(this.iteratedModels);
-    if (options.splitModels === true) {
-      this.ensureModelsAreSplit(model);
-      if (isModelObject(model)) {
-        this.iteratedModels[String(model.$id)] = model;
-      }
-    }
-    return [model, ...modelsToReturn];
+    return model;
   }
 
   /**
@@ -110,10 +95,9 @@ export class Interpreter {
    */
   interpretAndCombineSchema(schema: (Schema | boolean) | undefined, currentModel: CommonModel, rootSchema: Schema, interpreterOptions: InterpreterOptions = Interpreter.defaultInterpreterOptions): void {
     if (typeof schema !== 'object') {return;}
-    interpreterOptions = {...interpreterOptions, splitModels: false};
-    const models = this.interpret(schema, interpreterOptions);
-    if (models.length > 0) {
-      CommonModel.mergeCommonModels(currentModel, models[0], rootSchema);
+    const model = this.interpret(schema, interpreterOptions);
+    if (model !== undefined) {
+      CommonModel.mergeCommonModels(currentModel, model, rootSchema);
     }
   }
 
@@ -131,54 +115,4 @@ export class Interpreter {
       this.interpretAndCombineSchema(forEachSchema, currentModel, rootSchema, interpreterOptions);
     }
   }
-
-  /**
-  * This function splits up a model if it is determined it should.
-  * 
-  * @param model check if it should be split up
-  */
-  private trySplitModels(model: CommonModel): CommonModel {
-    if (isModelObject(model)) {
-      Logger.info(`Splitting model ${model.$id || 'any'} since it should be on its own`);
-      const switchRootModel = new CommonModel();
-      switchRootModel.$ref = model.$id;
-      this.iteratedModels[String(model.$id)] = model;
-      return switchRootModel;
-    }
-    return model;
-  }
-
-  /**
-   * Split up all model which should be and use $ref instead.
-   * 
-   * @param model
-   */
-  ensureModelsAreSplit(model: CommonModel): void {
-    if (model.properties) {
-      const existingProperties = model.properties;
-      for (const [property, propertyModel] of Object.entries(existingProperties)) {
-        model.properties[String(property)] = this.trySplitModels(propertyModel);
-      }
-    }
-    if (model.patternProperties) {
-      const existingPatternProperties = model.patternProperties;
-      for (const [pattern, patternModel] of Object.entries(existingPatternProperties)) {
-        model.patternProperties[String(pattern)] = this.trySplitModels(patternModel);
-      }
-    }
-    if (model.additionalProperties) {
-      model.additionalProperties = this.trySplitModels(model.additionalProperties);
-    }
-    if (model.items) {
-      let existingItems = model.items;
-      if (Array.isArray(existingItems)) {
-        for (const [itemIndex, itemModel] of existingItems.entries()) {
-          existingItems[Number(itemIndex)] = this.trySplitModels(itemModel);
-        }
-      } else {
-        existingItems = this.trySplitModels(existingItems);
-      }
-      model.items = existingItems;
-    }
-  }
 }
diff --git a/src/interpreter/PostInterpreter.ts b/src/interpreter/PostInterpreter.ts
new file mode 100644
index 00000000..24f94371
--- /dev/null
+++ b/src/interpreter/PostInterpreter.ts
@@ -0,0 +1,70 @@
+import { CommonModel } from '../models';
+import { Logger } from '../utils';
+import { isModelObject } from './Utils';
+/**
+ * Post process the interpreted model. By applying the following:
+ * - Ensure models are split as required
+ * 
+ * @param model 
+ */
+export function postInterpretModel(model: CommonModel): CommonModel[] {
+  const iteratedModels: CommonModel[] = [];
+  ensureModelsAreSplit(model, iteratedModels);
+  return iteratedModels;
+}
+
+/**
+ * This function splits up a model if needed and add the new model to the list of models.
+ * 
+ * @param model check if it should be split up
+ * @param iteratedModels which have already been split up
+ */
+function trySplitModels(model: CommonModel, iteratedModels: CommonModel[]): CommonModel {
+  if (isModelObject(model)) {
+    Logger.info(`Splitting model ${model.$id || 'any'} since it should be on its own`);
+    const switchRootModel = new CommonModel();
+    switchRootModel.$ref = model.$id;
+    ensureModelsAreSplit(model, iteratedModels);
+    return switchRootModel;
+  }
+  return model;
+}
+
+/**
+ * Split up all models which should and use ref instead.
+ * 
+ * @param model to ensure are split
+ * @param iteratedModels which are already split
+ */
+function ensureModelsAreSplit(model: CommonModel, iteratedModels: CommonModel[]): void {
+  // eslint-disable-next-line sonarjs/no-collapsible-if
+  if (iteratedModels.includes(model)) { return; }
+
+  iteratedModels.push(model);
+  if (model.properties) {
+    const existingProperties = model.properties;
+    for (const [prop, propSchema] of Object.entries(existingProperties)) {
+      model.properties[String(prop)] = trySplitModels(propSchema, iteratedModels);
+    }
+  }
+  if (model.patternProperties) {
+    const existingPatternProperties = model.patternProperties;
+    for (const [pattern, patternModel] of Object.entries(existingPatternProperties)) {
+      model.patternProperties[String(pattern)] = trySplitModels(patternModel, iteratedModels);
+    }
+  }
+  if (model.additionalProperties) {
+    model.additionalProperties = trySplitModels(model.additionalProperties, iteratedModels);
+  }
+  if (model.items) {
+    let existingItems = model.items;
+    if (Array.isArray(existingItems)) {
+      for (const [itemIndex, itemModel] of existingItems.entries()) {
+        existingItems[Number(itemIndex)] = trySplitModels(itemModel, iteratedModels);
+      }
+    } else {
+      existingItems = trySplitModels(existingItems, iteratedModels);
+    }
+    model.items = existingItems;
+  }
+}
diff --git a/src/processors/JsonSchemaInputProcessor.ts b/src/processors/JsonSchemaInputProcessor.ts
index c7e46c9f..49acdc67 100644
--- a/src/processors/JsonSchemaInputProcessor.ts
+++ b/src/processors/JsonSchemaInputProcessor.ts
@@ -3,6 +3,7 @@ import $RefParser from '@apidevtools/json-schema-ref-parser';
 import path from 'path';
 import { Schema, CommonModel, CommonInputModel} from '../models';
 import { Logger } from '../utils';
+import { postInterpretModel } from '../interpreter/PostInterpreter';
 import { Interpreter } from '../interpreter/Interpreter';
 
 /**
@@ -212,9 +213,11 @@ export class JsonSchemaInputProcessor extends AbstractInputProcessor {
    * @param schema to simplify to common model
    */
   static convertSchemaToCommonModel(schema: Schema | boolean): Record<string, CommonModel> {
-    const interpreter = new Interpreter();
-    const commonModels = interpreter.interpret(schema);
     const commonModelsMap: Record<string, CommonModel> = {};
+    const interpreter = new Interpreter();
+    const model = interpreter.interpret(schema);
+    if (model === undefined) { return commonModelsMap; }
+    const commonModels = postInterpretModel(model);
     for (const commonModel of commonModels) {
       if (commonModel.$id) {
         if (commonModelsMap[commonModel.$id] !== undefined) {


Test patch:
diff --git a/test/interpreter/Intepreter.spec.ts b/test/interpreter/Intepreter.spec.ts
index 3b06620b..910ef084 100644
--- a/test/interpreter/Intepreter.spec.ts
+++ b/test/interpreter/Intepreter.spec.ts
@@ -13,18 +13,15 @@ describe('Interpreter', () => {
       }
     };
     const interpreter = new Interpreter();
-    const models = interpreter.interpret(schema);
-    expect(models).toHaveLength(2);
-    const expectedSchema1Model = new CommonModel();
-    expectedSchema1Model.$id = 'schema1';
+    const interpretedModel = interpreter.interpret(schema);
+    expect(interpretedModel).not.toBeUndefined();
+    const expectedModel = new CommonModel();
+    expectedModel.$id = 'schema1';
     const expectedPropertyModel = new CommonModel();
-    expectedPropertyModel.$ref = 'schema2';
-    expectedSchema1Model.properties = {
+    expectedPropertyModel.$id = 'schema2';
+    expectedModel.properties = {
       testProp: expectedPropertyModel
     };
-    const expectedSchema2Model = new CommonModel();
-    expectedSchema2Model.$id = 'schema2';
-    expect(models[0]).toMatchObject(expectedSchema1Model);
-    expect(models[1]).toMatchObject(expectedSchema2Model);
+    expect(interpretedModel).toMatchObject(expectedModel);
   });
 });
diff --git a/test/interpreter/PostInterpreter.spec.ts b/test/interpreter/PostInterpreter.spec.ts
new file mode 100644
index 00000000..8d2e74a1
--- /dev/null
+++ b/test/interpreter/PostInterpreter.spec.ts
@@ -0,0 +1,204 @@
+import { CommonModel } from '../../src';
+import { postInterpretModel } from '../../src/interpreter/PostInterpreter';
+import { isModelObject } from '../../src/interpreter/Utils';
+jest.mock('../../src/interpreter/Utils');
+describe('PostInterpreter', () => {
+  beforeEach(() => {
+    jest.clearAllMocks();
+  });
+  afterAll(() => {
+    jest.restoreAllMocks();
+  });
+  describe('postInterpretModel()', () => {
+    test('should handle recursive models', () => {
+      const model = CommonModel.toCommonModel({
+        $id: 'schema1',
+        properties: { }
+      });
+      model.properties!['recursive'] = model;
+      (isModelObject as jest.Mock).mockReturnValue(true);
+
+      const postProcessedModels = postInterpretModel(model);
+
+      const expectedSchema1Model = new CommonModel();
+      expectedSchema1Model.$id = 'schema1';
+      expectedSchema1Model.properties = {
+        recursive: CommonModel.toCommonModel({
+          $ref: 'schema1'
+        })
+      };
+      expect(postProcessedModels).toHaveLength(1);
+      expect(postProcessedModels[0]).toMatchObject(expectedSchema1Model);
+    });
+    test('should split models if properties contains model object', () => {
+      const rawModel = {
+        $id: 'schema1',
+        properties: {
+          testProp: {
+            $id: 'schema2',
+            type: 'object'
+          }
+        }
+      };
+      const model = CommonModel.toCommonModel(rawModel);
+      (isModelObject as jest.Mock).mockReturnValue(true);
+
+      const postProcessedModels = postInterpretModel(model);
+
+      const expectedSchema1Model = new CommonModel();
+      expectedSchema1Model.$id = 'schema1';
+      const expectedPropertyModel = new CommonModel();
+      expectedPropertyModel.$ref = 'schema2';
+      expectedSchema1Model.properties = {
+        testProp: expectedPropertyModel
+      };
+      const expectedSchema2Model = new CommonModel();
+      expectedSchema2Model.$id = 'schema2';
+      expectedSchema2Model.type = 'object';
+
+      expect(postProcessedModels).toHaveLength(2);
+      expect(isModelObject).toHaveBeenNthCalledWith(1, expectedSchema2Model);
+      expect(postProcessedModels[0]).toMatchObject(expectedSchema1Model);
+      expect(postProcessedModels[1]).toMatchObject(expectedSchema2Model);
+    });
+    test('should split models if tuple items contains model object', () => {
+      const rawModel = {
+        $id: 'schema1',
+        items: [
+          {
+            $id: 'schema2',
+            type: 'object'
+          } 
+        ]
+      };  
+      const model = CommonModel.toCommonModel(rawModel);
+      (isModelObject as jest.Mock).mockReturnValue(true);
+
+      const postProcessedModels = postInterpretModel(model);
+
+      const expectedSchema1Model = new CommonModel();
+      expectedSchema1Model.$id = 'schema1';
+      const expectedItemModel = new CommonModel();
+      expectedItemModel.$ref = 'schema2';
+      expectedSchema1Model.items = [expectedItemModel];
+      const expectedSchema2Model = new CommonModel();
+      expectedSchema2Model.$id = 'schema2';
+      expectedSchema2Model.type = 'object';
+
+      expect(postProcessedModels).toHaveLength(2);
+      expect(isModelObject).toHaveBeenNthCalledWith(1, rawModel.items[0]);
+      expect(postProcessedModels[0]).toMatchObject(expectedSchema1Model);
+      expect(postProcessedModels[1]).toMatchObject(expectedSchema2Model);
+    });
+    test('should split models if array item contains model object', () => {
+      const rawModel = {
+        $id: 'schema1',
+        items: {
+          $id: 'schema2',
+          type: 'object'
+        }
+      };  
+      const model = CommonModel.toCommonModel(rawModel);
+      (isModelObject as jest.Mock).mockReturnValue(true);
+
+      const postProcessedModels = postInterpretModel(model);
+
+      const expectedSchema1Model = new CommonModel();
+      expectedSchema1Model.$id = 'schema1';
+      const expectedItemModel = new CommonModel();
+      expectedItemModel.$ref = 'schema2';
+      expectedSchema1Model.items = expectedItemModel;
+      const expectedSchema2Model = new CommonModel();
+      expectedSchema2Model.$id = 'schema2';
+      expectedSchema2Model.type = 'object';
+
+      expect(postProcessedModels).toHaveLength(2);
+      expect(isModelObject).toHaveBeenNthCalledWith(1, rawModel.items);
+      expect(postProcessedModels[0]).toMatchObject(expectedSchema1Model);
+      expect(postProcessedModels[1]).toMatchObject(expectedSchema2Model);
+    });
+    test('should split models if patternProperties contains model object', () => {
+      const rawModel = {
+        $id: 'schema1',
+        patternProperties: {
+          testPattern: {
+            $id: 'schema2',
+            type: 'object'
+          }
+        }
+      };  
+      const model = CommonModel.toCommonModel(rawModel);
+      (isModelObject as jest.Mock).mockReturnValue(true);
+
+      const postProcessedModels = postInterpretModel(model);
+
+      const expectedSchema1Model = new CommonModel();
+      expectedSchema1Model.$id = 'schema1';
+      const expectedPatternModel = new CommonModel();
+      expectedPatternModel.$ref = 'schema2';
+      expectedSchema1Model.patternProperties = {
+        testPattern: expectedPatternModel
+      };
+      const expectedSchema2Model = new CommonModel();
+      expectedSchema2Model.$id = 'schema2';
+
+      expect(postProcessedModels).toHaveLength(2);
+      expect(isModelObject).toHaveBeenNthCalledWith(1, rawModel.patternProperties!['testPattern']);
+      expect(postProcessedModels[0]).toMatchObject(expectedSchema1Model);
+      expect(postProcessedModels[1]).toMatchObject(expectedSchema2Model);
+    });
+    test('should split models if additionalProperties contains model object', () => {
+      const rawModel = {
+        $id: 'schema1',
+        additionalProperties: {
+          $id: 'schema2',
+          type: 'object'
+        }
+      };
+      const model = CommonModel.toCommonModel(rawModel);
+      (isModelObject as jest.Mock).mockReturnValue(true);
+
+      const postProcessedModels = postInterpretModel(model);
+
+      const expectedAdditionalPropertyModel = new CommonModel();
+      expectedAdditionalPropertyModel.$ref = 'schema2';
+      const expectedSchema1Model = new CommonModel();
+      expectedSchema1Model.$id = 'schema1';
+      expectedSchema1Model.additionalProperties = expectedAdditionalPropertyModel;
+      const expectedSchema2Model = new CommonModel();
+      expectedSchema2Model.$id = 'schema2';
+
+      expect(postProcessedModels).toHaveLength(2);
+      expect(isModelObject).toHaveBeenNthCalledWith(1, rawModel.additionalProperties);
+      expect(postProcessedModels[0]).toMatchObject(expectedSchema1Model);
+      expect(postProcessedModels[1]).toMatchObject(expectedSchema2Model);
+    });
+    test('should not split models if it is not considered model object', () => {
+      const rawModel = {
+        $id: 'schema1',
+        properties: {
+          testProp: {
+            $id: 'schema2',
+            type: 'object'
+          }
+        }
+      };
+      const model = CommonModel.toCommonModel(rawModel);
+      (isModelObject as jest.Mock).mockReturnValue(false);
+
+      const postProcessedModels = postInterpretModel(model);
+
+      const expectedSchema1Model = new CommonModel();
+      expectedSchema1Model.$id = 'schema1';
+      const expectedSchema2Model = new CommonModel();
+      expectedSchema2Model.$id = 'schema2';
+      expectedSchema1Model.properties = {
+        testProp: expectedSchema2Model
+      };
+
+      expect(postProcessedModels).toHaveLength(1);
+      expect(isModelObject).toHaveBeenNthCalledWith(1, rawModel.properties!['testProp']);
+      expect(postProcessedModels[0]).toMatchObject(expectedSchema1Model);
+    });
+  });
+});
diff --git a/test/interpreter/unit/Intepreter.spec.ts b/test/interpreter/unit/Intepreter.spec.ts
index 9b418f55..95c4ba25 100644
--- a/test/interpreter/unit/Intepreter.spec.ts
+++ b/test/interpreter/unit/Intepreter.spec.ts
@@ -1,5 +1,5 @@
 import {Interpreter} from '../../../src/interpreter/Interpreter';
-import {isModelObject, interpretName} from '../../../src/interpreter/Utils';
+import {interpretName} from '../../../src/interpreter/Utils';
 import interpretProperties from '../../../src/interpreter/InterpretProperties';
 import interpretConst from '../../../src/interpreter/InterpretConst';
 import interpretEnum from '../../../src/interpreter/InterpretEnum';
@@ -9,15 +9,7 @@ import interpretAdditionalProperties from '../../../src/interpreter/InterpretAdd
 import interpretNot from '../../../src/interpreter/InterpretNot';
 import { CommonModel, Schema } from '../../../src/models';
 
-let mockedIsModelObjectReturn = false;
-jest.mock('../../../src/interpreter/Utils', () => {
-  return {
-    interpretName: jest.fn(),
-    isModelObject: jest.fn().mockImplementation(() => {
-      return mockedIsModelObjectReturn;
-    })
-  };
-});
+jest.mock('../../../src/interpreter/Utils');
 jest.mock('../../../src/interpreter/InterpretProperties');
 jest.mock('../../../src/interpreter/InterpretConst');
 jest.mock('../../../src/interpreter/InterpretEnum');
@@ -33,73 +25,62 @@ CommonModel.mergeCommonModels = jest.fn();
 describe('Interpreter', () => {
   beforeEach(() => {
     jest.clearAllMocks();
-    mockedIsModelObjectReturn = false;
   });
   afterAll(() => {
     jest.restoreAllMocks();
   });
-  test('should return empty models if false schema', () => {
+  test('should return empty model if false schema', () => {
     const schema = false;
     const interpreter = new Interpreter();
-    const models = interpreter.interpret(schema);
-    expect(models).toHaveLength(0);
+    const model = interpreter.interpret(schema);
+    expect(model).toBeUndefined();
   });
   test('should inherit types from schema', () => {
     const schema = {
       type: ['string', 'number']
     };
     const interpreter = new Interpreter();
-    const models = interpreter.interpret(schema);
-    expect(models).toHaveLength(1);
-    expect(models[0].type).toEqual(['string', 'number']);
+    const model = interpreter.interpret(schema);
+    expect(model).not.toBeUndefined();
+    expect(model?.type).toEqual(['string', 'number']);
   });
   test('should inherit type from schema', () => {
     const schema = {
       type: 'string'
     };
     const interpreter = new Interpreter();
-    const models = interpreter.interpret(schema);
-    expect(models).toHaveLength(1);
-    expect(models[0].type).toEqual('string');
+    const model = interpreter.interpret(schema);
+    expect(model).not.toBeUndefined();
+    expect(model?.type).toEqual('string');
   });
   test('should return model with all types if true schema', () => {
     const schema = true;
     const interpreter = new Interpreter();
-    const models = interpreter.interpret(schema);
-    expect(models).toHaveLength(1);
-    expect(models[0].type).toEqual(['object', 'string', 'number', 'array', 'boolean', 'null', 'integer']);
+    const model = interpreter.interpret(schema);
+    expect(model).not.toBeUndefined();
+    expect(model?.type).toEqual(['object', 'string', 'number', 'array', 'boolean', 'null', 'integer']);
   });
   test('should set id of model if object', () => {
     const schema = { type: 'object' };
     const interpreter = new Interpreter();
-    const models = interpreter.interpret(schema);
-    expect(models).toHaveLength(1);
+    const model = interpreter.interpret(schema);
+    expect(model).not.toBeUndefined();
     expect(interpretName).toHaveBeenNthCalledWith(1, schema);
-    expect(models[0].$id).toEqual('anonymSchema1');
+    expect(model?.$id).toEqual('anonymSchema1');
   });
   test('should set custom id of model if object', () => {
     const schema = { $id: 'test' };
     const interpreter = new Interpreter();
-    const models = interpreter.interpret(schema);
-    expect(models).toHaveLength(1);
+    const model = interpreter.interpret(schema);
+    expect(model).not.toBeUndefined();
     expect(interpretName).toHaveBeenNthCalledWith(1, schema);
   });
   test('should set required list of properties', () => {
     const schema = { required: ['test'] };
     const interpreter = new Interpreter();
-    const models = interpreter.interpret(schema);
-    expect(models).toHaveLength(1);
-    expect(models[0].required).toEqual(schema.required);
-  });
-  test('should split models', () => {
-    const schema = { 
-      $id: 'root',
-      properties: { }
-    };
-    mockedIsModelObjectReturn = true;
-    const interpreter = new Interpreter();
-    const models = interpreter.interpret(schema);
-    expect(models).toHaveLength(1);
+    const model = interpreter.interpret(schema);
+    expect(model).not.toBeUndefined();
+    expect(model?.required).toEqual(schema.required);
   });
 
   test('should support recursive schemas', () => {
@@ -107,9 +88,9 @@ describe('Interpreter', () => {
     const schema2 = { anyOf: [schema1] };
     schema1.anyOf = [schema2];
     const interpreter = new Interpreter();
-    const models = interpreter.interpret(schema1);
-    expect(models).toHaveLength(1);
-    expect(models[0]).toEqual({originalSchema: schema1});
+    const model = interpreter.interpret(schema1);
+    expect(model).not.toBeUndefined();
+    expect(model).toEqual({originalSchema: schema1});
   });
   describe('combineSchemas', () => {
     test('should combine single schema with model', () => {
@@ -133,75 +114,6 @@ describe('Interpreter', () => {
       expect(CommonModel.mergeCommonModels).toHaveBeenNthCalledWith(1, model, expectedSimplifiedModel, schema);
     });
   });
-  describe('ensureModelsAreSplit', () => {
-    test('should split models if properties contains model object', () => {
-      mockedIsModelObjectReturn = true;
-      const propertyModel = new CommonModel();
-      propertyModel.type = 'object';
-      propertyModel.$id = 'test';
-      const model = new CommonModel();
-      model.properties = {
-        test: propertyModel
-      };
-      const interpreter = new Interpreter();
-      interpreter.ensureModelsAreSplit(model);
-      expect(isModelObject).toHaveBeenNthCalledWith(1, propertyModel);
-      expect(model.properties.test.$ref).toEqual('test');
-    });
-    test('should split models if items contains model object', () => {
-      mockedIsModelObjectReturn = true;
-      const itemModel = new CommonModel();
-      itemModel.type = 'object';
-      itemModel.$id = 'test';
-      const model = new CommonModel();
-      model.items = itemModel;
-      const interpreter = new Interpreter();
-      interpreter.ensureModelsAreSplit(model);
-      expect(isModelObject).toHaveBeenNthCalledWith(1, itemModel);
-      expect(model.items.$ref).toEqual('test');
-    });
-    test('should split models if patternProperties contains model object', () => {
-      mockedIsModelObjectReturn = true;
-      const patternModel = new CommonModel();
-      patternModel.type = 'object';
-      patternModel.$id = 'test';
-      const model = new CommonModel();
-      model.patternProperties = {
-        testPattern: patternModel
-      };
-      const interpreter = new Interpreter();
-      interpreter.ensureModelsAreSplit(model);
-      expect(isModelObject).toHaveBeenNthCalledWith(1, patternModel);
-      expect(model.patternProperties.testPattern.$ref).toEqual('test');
-    });
-    test('should split models if additionalProperties contains model object', () => {
-      mockedIsModelObjectReturn = true;
-      const additionalPropertyModel = new CommonModel();
-      additionalPropertyModel.type = 'object';
-      additionalPropertyModel.$id = 'test';
-      const model = new CommonModel();
-      model.additionalProperties = additionalPropertyModel;
-      const interpreter = new Interpreter();
-      interpreter.ensureModelsAreSplit(model);
-      expect(isModelObject).toHaveBeenNthCalledWith(1, additionalPropertyModel);
-      expect(model.additionalProperties.$ref).toEqual('test');
-    });
-    test('should not split models if it is not considered model object', () => {
-      mockedIsModelObjectReturn = false;
-      const propertyModel = new CommonModel();
-      propertyModel.type = 'object';
-      propertyModel.$id = 'test';
-      const model = new CommonModel();
-      model.properties = {
-        test: propertyModel
-      };
-      const interpreter = new Interpreter();
-      interpreter.ensureModelsAreSplit(model);
-      expect(isModelObject).toHaveBeenNthCalledWith(1, propertyModel);
-      expect(model.properties.test).toEqual(propertyModel);
-    });
-  });
-
   test('should always try to interpret properties', () => {
     const schema = {};
     const interpreter = new Interpreter();
@@ -249,9 +161,9 @@ describe('Interpreter', () => {
   test('should support primitive roots', () => {
     const schema = { type: 'string' };
     const interpreter = new Interpreter();
-    const actualModels = interpreter.interpret(schema);
-    expect(actualModels).not.toBeUndefined();
-    expect(actualModels[0]).toEqual({
+    const actualModel = interpreter.interpret(schema);
+    expect(actualModel).not.toBeUndefined();
+    expect(actualModel).toEqual({
       originalSchema: {
         type: 'string'
       },
diff --git a/test/interpreter/unit/InterpretAdditionalProperties.spec.ts b/test/interpreter/unit/InterpretAdditionalProperties.spec.ts
index e42e8329..9e812a94 100644
--- a/test/interpreter/unit/InterpretAdditionalProperties.spec.ts
+++ b/test/interpreter/unit/InterpretAdditionalProperties.spec.ts
@@ -2,22 +2,11 @@
 import { CommonModel } from '../../../src/models/CommonModel';
 import { Interpreter } from '../../../src/interpreter/Interpreter';
 import interpretAdditionalProperties from '../../../src/interpreter/InterpretAdditionalProperties';
-
-let mockedReturnModels = [new CommonModel()];
-jest.mock('../../../src/interpreter/Interpreter', () => {
-  return {
-    Interpreter: jest.fn().mockImplementation(() => {
-      return {
-        interpret: jest.fn().mockReturnValue(mockedReturnModels)
-      };
-    })
-  };
-});
+jest.mock('../../../src/interpreter/Interpreter');
 jest.mock('../../../src/models/CommonModel');
 describe('Interpretation of additionalProperties', () => {
   beforeEach(() => {
     jest.clearAllMocks();
-    mockedReturnModels = [new CommonModel()];
   });
   afterAll(() => {
     jest.restoreAllMocks();
@@ -27,17 +16,23 @@ describe('Interpretation of additionalProperties', () => {
     const model = new CommonModel();
     model.type = 'object';
     const interpreter = new Interpreter();
+    const mockedReturnModel = new CommonModel();
+    (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
     interpretAdditionalProperties(schema, model, interpreter);
+
     expect(interpreter.interpret).toHaveBeenNthCalledWith(1, { type: 'string' }, Interpreter.defaultInterpreterOptions);
-    expect(model.addAdditionalProperty).toHaveBeenNthCalledWith(1, mockedReturnModels[0], schema);
+    expect(model.addAdditionalProperty).toHaveBeenNthCalledWith(1, mockedReturnModel, schema);
   });
   test('should ignore model if interpreter cannot interpret additionalProperty schema', () => {
     const schema: any = { };
     const model = new CommonModel();
     model.type = 'object';
     const interpreter = new Interpreter();
-    mockedReturnModels.pop();
+    (interpreter.interpret as jest.Mock).mockReturnValue(undefined);
+
     interpretAdditionalProperties(schema, model, interpreter);
+
     expect(model.addAdditionalProperty).not.toHaveBeenCalled();
   });
   test('should only work if model is object type', () => {
@@ -45,7 +40,11 @@ describe('Interpretation of additionalProperties', () => {
     const model = new CommonModel();
     model.type = 'string';
     const interpreter = new Interpreter();
+    const mockedReturnModel = new CommonModel();
+    (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
     interpretAdditionalProperties(schema, model, interpreter);
+
     expect(interpreter.interpret).not.toHaveBeenCalled();
     expect(model.addAdditionalProperty).not.toHaveBeenCalled();
   });
@@ -54,8 +53,12 @@ describe('Interpretation of additionalProperties', () => {
     const model = new CommonModel();
     model.type = 'object';
     const interpreter = new Interpreter();
+    const mockedReturnModel = new CommonModel();
+    (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
     interpretAdditionalProperties(schema, model, interpreter);
+    
     expect(interpreter.interpret).toHaveBeenNthCalledWith(1, true, Interpreter.defaultInterpreterOptions);
-    expect(model.addAdditionalProperty).toHaveBeenNthCalledWith(1, mockedReturnModels[0], schema);
+    expect(model.addAdditionalProperty).toHaveBeenNthCalledWith(1, mockedReturnModel, schema);
   });
 });
diff --git a/test/interpreter/unit/InterpretAllOf.spec.ts b/test/interpreter/unit/InterpretAllOf.spec.ts
index e42d7c4a..8a592f7e 100644
--- a/test/interpreter/unit/InterpretAllOf.spec.ts
+++ b/test/interpreter/unit/InterpretAllOf.spec.ts
@@ -3,28 +3,10 @@ import { CommonModel } from '../../../src/models/CommonModel';
 import { Interpreter } from '../../../src/interpreter/Interpreter';
 import { isModelObject } from '../../../src/interpreter/Utils';
 import interpretAllOf from '../../../src/interpreter/InterpretAllOf';
-
-let interpreterOptions = Interpreter.defaultInterpreterOptions;
-let interpretedReturnModels = [new CommonModel()];
-jest.mock('../../../src/interpreter/Interpreter', () => {
-  return {
-    Interpreter: jest.fn().mockImplementation(() => {
-      return {
-        interpret: jest.fn().mockImplementation(() => {return interpretedReturnModels;}),
-        interpretAndCombineSchema: jest.fn()
-      };
-    })
-  };
-});
+const interpreterOptionsAllowInheritance = {allowInheritance: true};
+jest.mock('../../../src/interpreter/Interpreter');
 jest.mock('../../../src/models/CommonModel');
-let mockedIsModelObjectReturn = false;
-jest.mock('../../../src/interpreter/Utils', () => {
-  return {
-    isModelObject: jest.fn().mockImplementation(() => {
-      return mockedIsModelObjectReturn;
-    })
-  };
-});
+jest.mock('../../../src/interpreter/Utils');
 CommonModel.mergeCommonModels = jest.fn();
 /**
  * Some of these test are purely theoretical and have little if any merit 
@@ -33,9 +15,6 @@ CommonModel.mergeCommonModels = jest.fn();
 describe('Interpretation of allOf', () => {
   beforeEach(() => {
     jest.clearAllMocks();
-    interpreterOptions = {allowInheritance: true};
-    interpretedReturnModels = [new CommonModel()];
-    mockedIsModelObjectReturn = false;
   });
   afterAll(() => {
     jest.restoreAllMocks();
@@ -44,7 +23,11 @@ describe('Interpretation of allOf', () => {
   test('should not do anything if schema does not contain allOf', () => {
     const model = new CommonModel();
     const interpreter = new Interpreter();
+    (interpreter.interpret as jest.Mock).mockReturnValue(new CommonModel());
+    (isModelObject as jest.Mock).mockReturnValue(false);
+
     interpretAllOf({}, model, interpreter);
+
     expect(interpreter.interpretAndCombineSchema).not.toHaveBeenCalled();
     expect(JSON.stringify(model)).toEqual(JSON.stringify(new CommonModel()));
   });
@@ -52,20 +35,26 @@ describe('Interpretation of allOf', () => {
   test('should combine schemas if inheritance is disabled', () => {
     const model = new CommonModel();
     const schema = { allOf: [{}] };
-    interpreterOptions.allowInheritance = false;
     const interpreter = new Interpreter();
-    interpretAllOf(schema, model, interpreter, interpreterOptions);
-    expect(interpreter.interpret).toHaveBeenNthCalledWith(1, {}, interpreterOptions);
-    expect(interpreter.interpretAndCombineSchema).toHaveBeenNthCalledWith(1, schema.allOf[0], model, schema, interpreterOptions);
+    (interpreter.interpret as jest.Mock).mockReturnValue(new CommonModel());
+    (isModelObject as jest.Mock).mockReturnValue(false);
+
+    interpretAllOf(schema, model, interpreter, {allowInheritance: false});
+
+    expect(interpreter.interpret).toHaveBeenNthCalledWith(1, {}, {allowInheritance: false});
+    expect(interpreter.interpretAndCombineSchema).toHaveBeenNthCalledWith(1, schema.allOf[0], model, schema, {allowInheritance: false});
     expect(JSON.stringify(model)).toEqual(JSON.stringify(new CommonModel()));
   });
 
   test('should ignore model if interpreter cannot interpret schema', () => {
     const model = new CommonModel();
     const schema = { allOf: [{}] };
-    interpretedReturnModels.pop();
     const interpreter = new Interpreter();
-    interpretAllOf(schema, model, interpreter, interpreterOptions);
+    (interpreter.interpret as jest.Mock).mockReturnValue(undefined);
+    (isModelObject as jest.Mock).mockReturnValue(false);
+
+    interpretAllOf(schema, model, interpreter, interpreterOptionsAllowInheritance);
+
     expect(interpreter.interpretAndCombineSchema).not.toHaveBeenCalled();
     expect(JSON.stringify(model)).toEqual(JSON.stringify(new CommonModel()));
   });
@@ -73,19 +62,27 @@ describe('Interpretation of allOf', () => {
     const model = new CommonModel();
     const schema = { allOf: [] };
     const interpreter = new Interpreter();
-    interpretAllOf(schema, model, interpreter, interpreterOptions);
+    (interpreter.interpret as jest.Mock).mockReturnValue(new CommonModel());
+    (isModelObject as jest.Mock).mockReturnValue(false);
+
+    interpretAllOf(schema, model, interpreter, interpreterOptionsAllowInheritance);
+
     expect(interpreter.interpretAndCombineSchema).not.toHaveBeenCalled();
     expect(JSON.stringify(model)).toEqual(JSON.stringify(new CommonModel()));
   });
   test('should extend model', () => {
     const model = new CommonModel();
     const schema = { allOf: [{type: 'object', $id: 'test'}] };
-    interpretedReturnModels[0].$id = 'test';
-    mockedIsModelObjectReturn = true;
     const interpreter = new Interpreter();
-    interpretAllOf(schema, model, interpreter, interpreterOptions);
+    const interpretedModel = new CommonModel();
+    interpretedModel.$id = 'test';
+    (isModelObject as jest.Mock).mockReturnValue(true);
+    (interpreter.interpret as jest.Mock).mockReturnValue(interpretedModel);
+
+    interpretAllOf(schema, model, interpreter, interpreterOptionsAllowInheritance);
+
     expect(interpreter.interpretAndCombineSchema).not.toHaveBeenCalled();
     expect(isModelObject).toHaveBeenCalled();
-    expect(model.addExtendedModel).toHaveBeenCalledWith(interpretedReturnModels[0]);
+    expect(model.addExtendedModel).toHaveBeenCalledWith(interpretedModel);
   });
 });
diff --git a/test/interpreter/unit/InterpretItems.spec.ts b/test/interpreter/unit/InterpretItems.spec.ts
index 13ffc69b..ecd4e5f4 100644
--- a/test/interpreter/unit/InterpretItems.spec.ts
+++ b/test/interpreter/unit/InterpretItems.spec.ts
@@ -2,21 +2,11 @@
 import { CommonModel } from '../../../src/models/CommonModel';
 import { Interpreter } from '../../../src/interpreter/Interpreter';
 import interpretItems from '../../../src/interpreter/InterpretItems';
-let mockedReturnModels = [new CommonModel()];
-jest.mock('../../../src/interpreter/Interpreter', () => {
-  return {
-    Interpreter: jest.fn().mockImplementation(() => {
-      return {
-        interpret: jest.fn().mockReturnValue(mockedReturnModels)
-      };
-    })
-  };
-});
+jest.mock('../../../src/interpreter/Interpreter');
 jest.mock('../../../src/models/CommonModel');
 describe('Interpretation of', () => {
   beforeEach(() => {
     jest.clearAllMocks();
-    mockedReturnModels = [new CommonModel()];
   });
   afterAll(() => {
     jest.restoreAllMocks();
@@ -25,7 +15,11 @@ describe('Interpretation of', () => {
     const schema = {};
     const model = new CommonModel();
     const interpreter = new Interpreter();
+    const mockedReturnModel = new CommonModel();
+    (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
     interpretItems(schema, model, interpreter);
+
     expect(model.type).toBeUndefined();
     expect(model.addItem).not.toHaveBeenCalled();
   });
@@ -34,8 +28,10 @@ describe('Interpretation of', () => {
     const schema: any = { items: { type: 'string' } };
     const model = new CommonModel();
     const interpreter = new Interpreter();
-    mockedReturnModels.pop();
+    (interpreter.interpret as jest.Mock).mockReturnValue(undefined);
+    
     interpretItems(schema, model, interpreter);
+
     expect(model.type).toBeUndefined();
     expect(model.addItem).not.toHaveBeenCalled();
   });
@@ -44,15 +40,23 @@ describe('Interpretation of', () => {
       const schema: any = { items: { type: 'string' } };
       const model = new CommonModel();
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretItems(schema, model, interpreter);
+
       expect(interpreter.interpret).toHaveBeenNthCalledWith(1, { type: 'string' }, Interpreter.defaultInterpreterOptions);
-      expect(model.addItem).toHaveBeenNthCalledWith(1, mockedReturnModels[0], schema);
+      expect(model.addItem).toHaveBeenNthCalledWith(1, mockedReturnModel, schema);
     });
     test('should infer type of model', () => {
       const schema: any = { items: { type: 'string' } };
       const model = new CommonModel();
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretItems(schema, model, interpreter);
+
       expect(model.addTypes).toHaveBeenNthCalledWith(1, 'array');
     });
   });
@@ -61,17 +65,25 @@ describe('Interpretation of', () => {
       const schema: any = { items: [{ type: 'string' }, { type: 'number' }] };
       const model = new CommonModel();
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretItems(schema, model, interpreter);
+
       expect(interpreter.interpret).toHaveBeenNthCalledWith(1, { type: 'string' }, Interpreter.defaultInterpreterOptions);
       expect(interpreter.interpret).toHaveBeenNthCalledWith(2, { type: 'number' }, Interpreter.defaultInterpreterOptions);
-      expect(model.addItemTuple).toHaveBeenNthCalledWith(1, mockedReturnModels[0], schema, 0);
-      expect(model.addItemTuple).toHaveBeenNthCalledWith(2, mockedReturnModels[0], schema, 1);
+      expect(model.addItemTuple).toHaveBeenNthCalledWith(1, mockedReturnModel, schema, 0);
+      expect(model.addItemTuple).toHaveBeenNthCalledWith(2, mockedReturnModel, schema, 1);
     });
     test('should infer type of model', () => {
       const schema: any = { items: [{ type: 'string' }, { type: 'number' }] };
       const model = new CommonModel();
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretItems(schema, model, interpreter);
+      
       expect(model.addTypes).toHaveBeenNthCalledWith(1, 'array');
     });
   });
diff --git a/test/interpreter/unit/InterpretNot.spec.ts b/test/interpreter/unit/InterpretNot.spec.ts
index f4d142eb..5ebb0057 100644
--- a/test/interpreter/unit/InterpretNot.spec.ts
+++ b/test/interpreter/unit/InterpretNot.spec.ts
@@ -4,24 +4,14 @@ import { Interpreter } from '../../../src/interpreter/Interpreter';
 import interpretNot from '../../../src/interpreter/InterpretNot';
 import {inferTypeFromValue} from '../../../src/interpreter/Utils';
 import { Logger } from '../../../src/utils';
+let interpreterOptions = Interpreter.defaultInterpreterOptions;
 jest.mock('../../../src/interpreter/Utils');
 jest.mock('../../../src/utils');
-let interpreterOptions = Interpreter.defaultInterpreterOptions;
-let interpretedReturnModels = [new CommonModel()];
-jest.mock('../../../src/interpreter/Interpreter', () => {
-  return {
-    Interpreter: jest.fn().mockImplementation(() => {
-      return {
-        interpret: jest.fn().mockImplementation(() => {return interpretedReturnModels;})
-      };
-    })
-  };
-});
+jest.mock('../../../src/interpreter/Interpreter');
 describe('Interpretation of not', () => {
   beforeEach(() => {
     jest.clearAllMocks();
     (inferTypeFromValue as jest.Mock).mockImplementation(() => {return;});
-    interpretedReturnModels = [new CommonModel()];
     interpreterOptions = Interpreter.defaultInterpreterOptions;
   });
   afterAll(() => {
@@ -41,15 +31,22 @@ describe('Interpretation of not', () => {
     const schema: any = { not: { } };
     const model = new CommonModel();
     const interpreter = new Interpreter();
-    interpretedReturnModels.pop();
+    const mockedReturnModel = new CommonModel();
+    (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
     interpretNot(schema, model, interpreter, interpreterOptions);
+
     expect(JSON.stringify(model)).toEqual(JSON.stringify(new CommonModel()));
   });
   test('should warn about true schemas', () => {
     const schema: any = { not: true};
     const model = new CommonModel();
     const interpreter = new Interpreter();
+    const mockedReturnModel = new CommonModel();
+    (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
     interpretNot(schema, model, interpreter, interpreterOptions);
+
     expect(interpreter.interpret).not.toHaveBeenCalled();
     expect(JSON.stringify(model)).toEqual(JSON.stringify(new CommonModel()));
     expect(Logger.warn).toHaveBeenCalled();
@@ -57,26 +54,30 @@ describe('Interpretation of not', () => {
   describe('double negate', () => {
     test('should double negate enum', () => {
       const schema: any = { not: { enum: ['value'], not: { enum: ['value'] } }};
-      const notModel = new CommonModel();
-      interpretedReturnModels = [notModel];
       const model = new CommonModel();
       model.enum = ['value'];
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretNot(schema, model, interpreter, interpreterOptions);
-      const expectedInterpreterOptions = {...interpreterOptions, splitModels: false, allowInheritance: false};
+
+      const expectedInterpreterOptions = {...interpreterOptions, allowInheritance: false};
       expect(interpreter.interpret).toHaveBeenNthCalledWith(1, schema.not, expectedInterpreterOptions);
       expect(model.enum).toEqual(['value']);
     });
 
     test('should double negate types', () => {
       const schema: any = { not: { type: 'string', not: { type: 'string' }}};
-      const notModel = new CommonModel();
-      interpretedReturnModels = [notModel];
       const model = new CommonModel();
       model.type = 'string';
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretNot(schema, model, interpreter, interpreterOptions);
-      const expectedInterpreterOptions = {...interpreterOptions, splitModels: false, allowInheritance: false};
+      
+      const expectedInterpreterOptions = {...interpreterOptions, allowInheritance: false};
       expect(interpreter.interpret).toHaveBeenNthCalledWith(1, schema.not, expectedInterpreterOptions);
       expect(model.type).toEqual('string');
     });
@@ -84,53 +85,61 @@ describe('Interpretation of not', () => {
   describe('enums', () => {
     test('should remove already existing inferred enums', () => {
       const schema: any = { not: { enum: ['value'] }};
-      const notModel = new CommonModel();
-      notModel.enum = schema.not.enum;
-      interpretedReturnModels = [notModel];
       const model = new CommonModel();
       model.enum = ['value'];
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      mockedReturnModel.enum = schema.not.enum;
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretNot(schema, model, interpreter, interpreterOptions);
-      const expectedInterpreterOptions = {...interpreterOptions, splitModels: false, allowInheritance: false};
+
+      const expectedInterpreterOptions = {...interpreterOptions, allowInheritance: false};
       expect(interpreter.interpret).toHaveBeenNthCalledWith(1, schema.not, expectedInterpreterOptions);
       expect(model.enum).toBeUndefined();
     });
     test('should handle negating only existing enum', () => {
       const schema: any = { not: { enum: ['value'] }};
-      const notModel = new CommonModel();
-      notModel.enum = schema.not.enum;
-      interpretedReturnModels = [notModel];
       const model = new CommonModel();
       model.enum = ['value', 'value2'];
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      mockedReturnModel.enum = schema.not.enum;
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretNot(schema, model, interpreter, interpreterOptions);
-      const expectedInterpreterOptions = {...interpreterOptions, splitModels: false, allowInheritance: false};
+
+      const expectedInterpreterOptions = {...interpreterOptions, allowInheritance: false};
       expect(interpreter.interpret).toHaveBeenNthCalledWith(1, schema.not, expectedInterpreterOptions);
       expect(model.enum).toEqual(['value2']);
     });
     test('should not negating non existing enum', () => {
       const schema: any = { not: { enum: ['value'] }};
-      const notModel = new CommonModel();
-      notModel.enum = schema.not.enum;
-      interpretedReturnModels = [notModel];
       const model = new CommonModel();
       model.enum = ['value2'];
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      mockedReturnModel.enum = schema.not.enum;
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretNot(schema, model, interpreter, interpreterOptions);
-      const expectedInterpreterOptions = {...interpreterOptions, splitModels: false, allowInheritance: false};
+
+      const expectedInterpreterOptions = {...interpreterOptions, allowInheritance: false};
       expect(interpreter.interpret).toHaveBeenNthCalledWith(1, schema.not, expectedInterpreterOptions);
       expect(model.enum).toEqual(['value2']);
     });
     test('should handle multiple negated enums', () => {
       const schema: any = { not: { enum: ['value', 'value2'] }};
-      const notModel = new CommonModel();
-      notModel.enum = schema.not.enum;
-      interpretedReturnModels = [notModel];
       const model = new CommonModel();
       model.enum = ['value', 'value2', 'value3'];
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      mockedReturnModel.enum = schema.not.enum;
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretNot(schema, model, interpreter, interpreterOptions);
-      const expectedInterpreterOptions = {...interpreterOptions, splitModels: false, allowInheritance: false};
+
+      const expectedInterpreterOptions = {...interpreterOptions, allowInheritance: false};
       expect(interpreter.interpret).toHaveBeenNthCalledWith(1, schema.not, expectedInterpreterOptions);
       expect(model.enum).toEqual(['value3']);
     });
@@ -138,53 +147,61 @@ describe('Interpretation of not', () => {
   describe('types', () => {
     test('should handle negating only existing type', () => {
       const schema: any = { not: { type: 'string' }};
-      const notModel = new CommonModel();
-      notModel.type = schema.not.type;
-      interpretedReturnModels = [notModel];
       const model = new CommonModel();
       model.type = 'string';
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      mockedReturnModel.type = schema.not.type;
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretNot(schema, model, interpreter, interpreterOptions);
-      const expectedInterpreterOptions = {...interpreterOptions, splitModels: false, allowInheritance: false};
+
+      const expectedInterpreterOptions = {...interpreterOptions, allowInheritance: false};
       expect(interpreter.interpret).toHaveBeenNthCalledWith(1, schema.not, expectedInterpreterOptions);
       expect(model.type).toBeUndefined();
     });
     test('should remove already existing inferred type', () => {
       const schema: any = { not: { type: 'string' }};
-      const notModel = new CommonModel();
-      notModel.type = schema.not.type;
-      interpretedReturnModels = [notModel];
       const model = new CommonModel();
       model.type = ['string', 'number'];
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      mockedReturnModel.type = schema.not.type;
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretNot(schema, model, interpreter, interpreterOptions);
-      const expectedInterpreterOptions = {...interpreterOptions, splitModels: false, allowInheritance: false};
+
+      const expectedInterpreterOptions = {...interpreterOptions, allowInheritance: false};
       expect(interpreter.interpret).toHaveBeenNthCalledWith(1, schema.not, expectedInterpreterOptions);
       expect(model.type).toEqual('number');
     });
     test('should not negating non existing type', () => {
       const schema: any = { not: { type: 'string' }};
-      const notModel = new CommonModel();
-      notModel.type = schema.not.type;
-      interpretedReturnModels = [notModel];
       const model = new CommonModel();
       model.type = 'number';
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      mockedReturnModel.type = schema.not.type;
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretNot(schema, model, interpreter, interpreterOptions);
-      const expectedInterpreterOptions = {...interpreterOptions, splitModels: false, allowInheritance: false};
+
+      const expectedInterpreterOptions = {...interpreterOptions, allowInheritance: false};
       expect(interpreter.interpret).toHaveBeenNthCalledWith(1, schema.not, expectedInterpreterOptions);
       expect(model.type).toEqual('number');
     });
     test('should handle multiple negated types', () => {
       const schema: any = { not: { type: ['string', 'number'] }};
-      const notModel = new CommonModel();
-      notModel.type = schema.not.type;
-      interpretedReturnModels = [notModel];
       const model = new CommonModel();
       model.type = ['number', 'string', 'integer'];
       const interpreter = new Interpreter();
+      const mockedReturnModel = new CommonModel();
+      mockedReturnModel.type = schema.not.type;
+      (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
       interpretNot(schema, model, interpreter, interpreterOptions);
-      const expectedInterpreterOptions = {...interpreterOptions, splitModels: false, allowInheritance: false};
+
+      const expectedInterpreterOptions = {...interpreterOptions, allowInheritance: false};
       expect(interpreter.interpret).toHaveBeenNthCalledWith(1, schema.not, expectedInterpreterOptions);
       expect(model.type).toEqual('integer');
     });
diff --git a/test/interpreter/unit/InterpretProperties.spec.ts b/test/interpreter/unit/InterpretProperties.spec.ts
index 0053e234..78b440a4 100644
--- a/test/interpreter/unit/InterpretProperties.spec.ts
+++ b/test/interpreter/unit/InterpretProperties.spec.ts
@@ -2,18 +2,7 @@
 import { CommonModel } from '../../../src/models/CommonModel';
 import { Interpreter } from '../../../src/interpreter/Interpreter';
 import interpretProperties from '../../../src/interpreter/InterpretProperties';
-let interpretedReturnModels = [new CommonModel()];
-jest.mock('../../../src/interpreter/Interpreter', () => {
-  return {
-    Interpreter: jest.fn().mockImplementation(() => {
-      return {
-        interpret: jest.fn().mockImplementation(() => { 
-          return interpretedReturnModels; 
-        })
-      };
-    })
-  };
-});
+jest.mock('../../../src/interpreter/Interpreter');
 jest.mock('../../../src/models/CommonModel');
 CommonModel.mergeCommonModels = jest.fn();
 /**
@@ -23,7 +12,6 @@ CommonModel.mergeCommonModels = jest.fn();
 describe('Interpretation of properties', () => {
   beforeEach(() => {
     jest.clearAllMocks();
-    interpretedReturnModels = [new CommonModel()];
   });
   afterAll(() => {
     jest.restoreAllMocks();
@@ -33,32 +21,44 @@ describe('Interpretation of properties', () => {
     const schema = {};
     const model = new CommonModel();
     const interpreter = new Interpreter();
+    const mockedReturnModel = new CommonModel();
+    (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
     interpretProperties(schema, model, interpreter);
+    
     expect(JSON.stringify(model)).toEqual(JSON.stringify(new CommonModel()));
   });
   test('should ignore model if interpreter cannot interpret property schema', () => {
     const schema: any = { properties: { property1: { type: 'string' } } };
     const model = new CommonModel();
     const interpreter = new Interpreter();
-    interpretedReturnModels.pop();
+    (interpreter.interpret as jest.Mock).mockReturnValue(undefined);
+
     interpretProperties(schema, model, interpreter);
+
     expect(model.addProperty).not.toHaveBeenCalled();
   });
   test('should infer type of model', () => {
     const schema: any = { properties: { property1: { type: 'string' } } };
     const model = new CommonModel();
     const interpreter = new Interpreter();
+    const mockedReturnModel = new CommonModel();
+    (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
     interpretProperties(schema, model, interpreter);
+
     expect(model.addTypes).toHaveBeenNthCalledWith(1, 'object');
   });
   test('should go trough properties and add it to model', () => {
     const schema: any = { properties: { property1: { type: 'string' } } };
-    const interpretedModel = new CommonModel();
-    interpretedReturnModels = [interpretedModel];
     const model = new CommonModel();
     const interpreter = new Interpreter();
+    const mockedReturnModel = new CommonModel();
+    (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+    
     interpretProperties(schema, model, interpreter);
+
     expect(interpreter.interpret).toHaveBeenNthCalledWith(1, { type: 'string' }, Interpreter.defaultInterpreterOptions);
-    expect(model.addProperty).toHaveBeenNthCalledWith(1, 'property1', interpretedModel, schema);
+    expect(model.addProperty).toHaveBeenNthCalledWith(1, 'property1', mockedReturnModel, schema);
   });
 });
diff --git a/test/interpreter/unit/patternProperties.spec.ts b/test/interpreter/unit/patternProperties.spec.ts
index 3ff0d729..1d055e93 100644
--- a/test/interpreter/unit/patternProperties.spec.ts
+++ b/test/interpreter/unit/patternProperties.spec.ts
@@ -3,22 +3,12 @@ import { CommonModel } from '../../../src/models/CommonModel';
 import { Interpreter } from '../../../src/interpreter/Interpreter';
 import interpretPatternProperties from '../../../src/interpreter/InterpretPatternProperties';
 
-let mockedReturnModels = [new CommonModel()];
-jest.mock('../../../src/interpreter/Interpreter', () => {
-  return {
-    Interpreter: jest.fn().mockImplementation(() => {
-      return {
-        interpret: jest.fn().mockReturnValue(mockedReturnModels)
-      };
-    })
-  };
-});
+jest.mock('../../../src/interpreter/Interpreter');
 jest.mock('../../../src/models/CommonModel');
 
 describe('Interpretation of patternProperties', () => {
   beforeEach(() => {
     jest.clearAllMocks();
-    mockedReturnModels = [new CommonModel()];
   });
   afterAll(() => {
     jest.restoreAllMocks();
@@ -27,13 +17,21 @@ describe('Interpretation of patternProperties', () => {
   test('should not do anything if schema does not contain patternProperties', () => {
     const model = new CommonModel();
     const interpreter = new Interpreter();
+    const mockedReturnModel = new CommonModel();
+    (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
     interpretPatternProperties({}, model, interpreter);
+
     expect(model.addPatternProperty).not.toHaveBeenCalled();
   });
   test('should not do anything if schema is boolean', () => {
     const model = new CommonModel();
     const interpreter = new Interpreter();
+    const mockedReturnModel = new CommonModel();
+    (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
     interpretPatternProperties(true, model, interpreter);
+
     expect(model.addPatternProperty).not.toHaveBeenCalled();
   });
 
@@ -42,16 +40,22 @@ describe('Interpretation of patternProperties', () => {
     const model = new CommonModel();
     model.type = 'object';
     const interpreter = new Interpreter();
-    mockedReturnModels.pop();
+    (interpreter.interpret as jest.Mock).mockReturnValue(undefined);
+
     interpretPatternProperties(schema, model, interpreter);
+
     expect(model.addPatternProperty).not.toHaveBeenCalled();
   });
   test('should use as is', () => {
     const schema: any = { patternProperties: { pattern: { type: 'string' } } };
     const model = new CommonModel();
     const interpreter = new Interpreter();
+    const mockedReturnModel = new CommonModel();
+    (interpreter.interpret as jest.Mock).mockReturnValue(mockedReturnModel);
+
     interpretPatternProperties(schema, model, interpreter);
+    
     expect(interpreter.interpret).toHaveBeenNthCalledWith(1, { type: 'string' }, Interpreter.defaultInterpreterOptions);
-    expect(model.addPatternProperty).toHaveBeenNthCalledWith(1, 'pattern', mockedReturnModels[0], schema);
+    expect(model.addPatternProperty).toHaveBeenNthCalledWith(1, 'pattern', mockedReturnModel, schema);
   });
 });
diff --git a/test/processors/JsonSchemaInputProcessor.spec.ts b/test/processors/JsonSchemaInputProcessor.spec.ts
index 986a0dec..5c80781b 100644
--- a/test/processors/JsonSchemaInputProcessor.spec.ts
+++ b/test/processors/JsonSchemaInputProcessor.spec.ts
@@ -3,7 +3,9 @@ import * as path from 'path';
 import { JsonSchemaInputProcessor } from '../../src/processors/JsonSchemaInputProcessor';
 import { CommonModel, Schema } from '../../src/models';
 import { Logger } from '../../src/utils';
+import { postInterpretModel } from '../../src/interpreter/PostInterpreter';
 jest.mock('../../src/interpreter/Interpreter');
+jest.mock('../../src/interpreter/PostInterpreter');
 jest.mock('../../src/utils/LoggingInterface');
 jest.spyOn(JsonSchemaInputProcessor, 'convertSchemaToCommonModel');
 
@@ -12,11 +14,16 @@ jest.mock('../../src/interpreter/Interpreter', () => {
   return {
     Interpreter: jest.fn().mockImplementation(() => {
       return {
-        interpret: jest.fn().mockReturnValue(mockedReturnModels)
+        interpret: jest.fn().mockImplementation(() => {return mockedReturnModels[0];})
       };
     })
   };
 });
+jest.mock('../../src/interpreter/PostInterpreter', () => {
+  return {
+    postInterpretModel: jest.fn().mockImplementation(() => {return mockedReturnModels;})
+  };
+});
 describe('JsonSchemaInputProcessor', () => {
   beforeEach(() => {
     jest.clearAllMocks();
@@ -48,24 +55,31 @@ describe('JsonSchemaInputProcessor', () => {
       expect(JsonSchemaInputProcessor.convertSchemaToCommonModel).toHaveBeenCalledTimes(1);
       const functionArgConvertSchemaToCommonModel = (JsonSchemaInputProcessor.convertSchemaToCommonModel as jest.Mock).mock.calls[0][0];
       expect(functionArgConvertSchemaToCommonModel).toMatchObject(inputSchema);
+      expect(postInterpretModel).toHaveBeenCalledTimes(1);
     });
     test('should be able to use $ref', async () => {
       const inputSchemaPath = './JsonSchemaInputProcessor/references.json';
+
       const {commonInputModel, inputSchema} = await getCommonInput(inputSchemaPath);
+
       const expectedResolvedInput = {...inputSchema, properties: { street_address: { type: 'string' }}};
+      const functionArgConvertSchemaToCommonModel = (JsonSchemaInputProcessor.convertSchemaToCommonModel as jest.Mock).mock.calls[0][0];
       expect(commonInputModel).toMatchObject({models: {test: {$id: 'test'}}, originalInput: inputSchema});
       expect(JsonSchemaInputProcessor.convertSchemaToCommonModel).toHaveBeenCalledTimes(1);
-      const functionArgConvertSchemaToCommonModel = (JsonSchemaInputProcessor.convertSchemaToCommonModel as jest.Mock).mock.calls[0][0];
       expect(functionArgConvertSchemaToCommonModel).toMatchObject(expectedResolvedInput);
+      expect(postInterpretModel).toHaveBeenCalledTimes(1);
     });
     test('should be able to use $ref when circular', async () => {
       const inputSchemaPath = './JsonSchemaInputProcessor/references_circular.json';
+
       const {commonInputModel, inputSchema} = await getCommonInput(inputSchemaPath);
+
       const expectedResolvedInput = {...inputSchema, definitions: {}, properties: { street_address: { type: 'object', properties: { floor: { type: 'object', properties: {} } }}}};
+      const functionArgConvertSchemaToCommonModel = (JsonSchemaInputProcessor.convertSchemaToCommonModel as jest.Mock).mock.calls[0][0];
       expect(commonInputModel).toMatchObject({models: {test: {$id: 'test'}}, originalInput: inputSchema});
       expect(JsonSchemaInputProcessor.convertSchemaToCommonModel).toHaveBeenCalledTimes(1);
-      const functionArgConvertSchemaToCommonModel = (JsonSchemaInputProcessor.convertSchemaToCommonModel as jest.Mock).mock.calls[0][0];
       expect(functionArgConvertSchemaToCommonModel).toMatchObject(expectedResolvedInput);
+      expect(postInterpretModel).toHaveBeenCalledTimes(1);
     });
     test('should fail correctly when reference cannot be resolved', async () => {
       const inputSchemaPath = './JsonSchemaInputProcessor/wrong_references.json';