Skip to content

Commit

Permalink
Use raw name (luyadev#533)
Browse files Browse the repository at this point in the history
* Use raw name

If not the raw name is used the object context informations wont work as normalized values only return default values like string, integer even when the resources is a class name

* Update PhpDocType.php

* Update CHANGELOG.md

* Use raw name for array notation finder in class name
  • Loading branch information
nadar authored and slowfox089 committed Dec 10, 2020
1 parent dc6dcbb commit cbe9f61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
In order to read more about upgrading and BC breaks have a look at the [UPGRADE Document](UPGRADE.md).

## 3.4.1

+ [#533](https://github.com/luyadev/luya-module-admin/pull/533) Fixed a bug where OpenApi property relations won't expand.

## 3.4.0 (21. July 2020)

+ [#530](https://github.com/luyadev/luya-module-admin/pull/530) Attach query behaviors in `luya\admin\ngrest\base\NgRestModel::find`.
Expand Down
4 changes: 2 additions & 2 deletions src/openapi/phpdoc/PhpDocType.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(PhpDocParser $phpDocParser, $type)

public function getIsScalar()
{
return in_array($this->getNoramlizeName(), [
return in_array($this->rawName, [
'bool',
'boolean',
'string',
Expand Down Expand Up @@ -69,7 +69,7 @@ public function getIsObject()

public function getIsArray()
{
return StringHelper::contains('[]', $this->name) || in_array($this->name, [
return StringHelper::contains('[]', $this->rawName) || in_array($this->name, [
'array',
'iterable',
]);
Expand Down

0 comments on commit cbe9f61

Please sign in to comment.