protected function computeOperationsDefaultResponsesMakers()
	{
		foreach ($this->openApiFileContent['paths'] as $path => $operations) {
			foreach ($operations as $httpMethod => $operation) {
				if (isset($operation['tags'])) {
					$extractedTags = [];
					foreach ($operation['tags'] as $tag) {
						$split = explode(':', $tag);
						if (count($split) == 2) {
							switch ($split[0]) {
								case 'Manager' :
									if (!isset($extractedTags['Managers'])) {
										$extractedTags['Managers'] = [];
									}
									$extractedTags['Managers'][] = $split[1];
									break;
								case 'Resource' :
									if (!isset($extractedTags['Resources'])) {
										$extractedTags['Resources'] = [];
									}
									$extractedTags['Resources'][] = $split[1];
									break;
							}
						}
					}
					
					foreach ($extractedTags as $tagType => $typeTags) {
						foreach ($typeTags as $typeTag) {
							switch ($tagType) {
								case 'Managers' :
									if (isset($this->managersData[ucfirst($typeTag)]['routes'][$operation['operationId']]['defaultReturn'])) {
										$defaultReturn = $this->managersData[ucfirst($typeTag)]['routes'][$operation['operationId']]['defaultReturn'];
										if (!is_null($defaultReturn)) {
											$this->managersData[ucfirst($typeTag)]['routes'][$operation['operationId']]['defaultResponseMaker'] = $this->computeOperationDefaultResponsesMaker('Managers', $typeTag, $operation, $defaultReturn);
										}
									}
									break;
								
								case 'Resources' :
									if (isset($this->resourcesData[ucfirst($typeTag)]['routes'][$operation['operationId']]['defaultReturn'])) {
										$defaultReturn = $this->resourcesData[ucfirst($typeTag)]['routes'][$operation['operationId']]['defaultReturn'];
										if (!is_null($defaultReturn)) {
											$this->resourcesData[ucfirst($typeTag)]['routes'][$operation['operationId']]['defaultResponseMaker'] = $this->computeOperationDefaultResponsesMaker('Resources', $typeTag, $operation, $defaultReturn);
										}
									}
									break;
							}
						}
					}
				}
			}
		}
	}
protected function computeOperationsDefaultResponsesMakers()
	{
		foreach ($this->openApiFileContent['paths'] as $path => $operations) {
			foreach ($operations as $httpMethod => $operation) {
				if (isset($operation['tags'])) {
					$extractedTags = [];
					foreach ($operation['tags'] as $tag) {
						$split = explode(':', $tag);
						if (count($split) == 2) {
							switch ($split[0]) {
								case 'Manager' :
									if (!isset($extractedTags['Managers'])) {
										$extractedTags['Managers'] = [];
									}
									$extractedTags['Managers'][] = $split[1];
									break;
								case 'Resource' :
									if (!isset($extractedTags['Resources'])) {
										$extractedTags['Resources'] = [];
									}
									$extractedTags['Resources'][] = $split[1];
									break;
							}
						}
					}
					
					foreach ($extractedTags as $tagType => $typeTags) {
						foreach ($typeTags as $typeTag) {
							switch ($tagType) {
								case 'Managers' :
									if (isset($this->managersData[ucfirst($typeTag)]['routes'][$operation['operationId']]['defaultReturn'])) {
										$defaultReturn = $this->managersData[ucfirst($typeTag)]['routes'][$operation['operationId']]['defaultReturn'];
										if (!is_null($defaultReturn)) {
											$this->managersData[ucfirst($typeTag)]['routes'][$operation['operationId']]['defaultResponseMaker'] = $this->computeOperationDefaultResponsesMaker('Managers', $typeTag, $operation, $defaultReturn);
										}
									}
									break;
								
								case 'Resources' :
									if (isset($this->resourcesData[ucfirst($typeTag)]['routes'][$operation['operationId']]['defaultReturn'])) {
										$defaultReturn = $this->resourcesData[ucfirst($typeTag)]['routes'][$operation['operationId']]['defaultReturn'];
										if (!is_null($defaultReturn)) {
											$this->resourcesData[ucfirst($typeTag)]['routes'][$operation['operationId']]['defaultResponseMaker'] = $this->computeOperationDefaultResponsesMaker('Resources', $typeTag, $operation, $defaultReturn);
										}
									}
									break;
							}
						}
					}
				}
			}
		}
	}
protected function computeOperationsDefaultResponsesMakers ( ) { foreach ( $ this -> openApiFileContent [ 'paths' ] as $ path => $ operations ) { foreach ( $ operations as $ httpMethod => $ operation ) { if ( isset ( $ operation [ 'tags' ] ) ) { $ extractedTags = [ ] ; foreach ( $ operation [ 'tags' ] as $ tag ) { $ split = explode ( ':' , $ tag ) ; if ( count ( $ split ) == 2 ) { switch ( $ split [ 0 ] ) { case 'Manager' : if ( ! isset ( $ extractedTags [ 'Managers' ] ) ) { $ extractedTags [ 'Managers' ] = [ ] ; } $ extractedTags [ 'Managers' ] [ ] = $ split [ 1 ] ; break ; case 'Resource' : if ( ! isset ( $ extractedTags [ 'Resources' ] ) ) { $ extractedTags [ 'Resources' ] = [ ] ; } $ extractedTags [ 'Resources' ] [ ] = $ split [ 1 ] ; break ; } } } foreach ( $ extractedTags as $ tagType => $ typeTags ) { foreach ( $ typeTags as $ typeTag ) { switch ( $ tagType ) { case 'Managers' : if ( isset ( $ this -> managersData [ ucfirst ( $ typeTag ) ] [ 'routes' ] [ $ operation [ 'operationId' ] ] [ 'defaultReturn' ] ) ) { $ defaultReturn = $ this -> managersData [ ucfirst ( $ typeTag ) ] [ 'routes' ] [ $ operation [ 'operationId' ] ] [ 'defaultReturn' ] ; if ( ! is_null ( $ defaultReturn ) ) { $ this -> managersData [ ucfirst ( $ typeTag ) ] [ 'routes' ] [ $ operation [ 'operationId' ] ] [ 'defaultResponseMaker' ] = $ this -> computeOperationDefaultResponsesMaker ( 'Managers' , $ typeTag , $ operation , $ defaultReturn ) ; } } break ; case 'Resources' : if ( isset ( $ this -> resourcesData [ ucfirst ( $ typeTag ) ] [ 'routes' ] [ $ operation [ 'operationId' ] ] [ 'defaultReturn' ] ) ) { $ defaultReturn = $ this -> resourcesData [ ucfirst ( $ typeTag ) ] [ 'routes' ] [ $ operation [ 'operationId' ] ] [ 'defaultReturn' ] ; if ( ! is_null ( $ defaultReturn ) ) { $ this -> resourcesData [ ucfirst ( $ typeTag ) ] [ 'routes' ] [ $ operation [ 'operationId' ] ] [ 'defaultResponseMaker' ] = $ this -> computeOperationDefaultResponsesMaker ( 'Resources' , $ typeTag , $ operation , $ defaultReturn ) ; } } break ; } } } } } } }
Add operation default responses makers
Add operation default responses makers