Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Проверка null-значений в обязательных свойствах #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

d-hurricane
Copy link
Contributor

Closed #13

@d-hurricane
Copy link
Contributor Author

Мне еще кажется неудачным следующее сообщение об ошибке, когда значение свойства равно Неопределено или Null, но при этом свойство не Nullable:

%1 Свойство <%2> объявлено, и должно быть заполнено, но это не так;

Кажется, что рядового 1С-ника такой текст может ввести в заблуждение, ведь заполненное значение для него, это не только не Null и не Неопределено, но также и не пустая строка, не 0 и т.д.

@sonar-1cdevelopers-ru
Copy link

Failed

  • 1 New Issues (is greater than 0)

Analysis Details

1 Issue

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 1 Code Smell

Coverage and Duplications

  • Coverage No coverage information (0.00% Estimated after merge)
  • Duplications 0.00% Duplicated Code (0.00% Estimated after merge)

Project ID: 1c_openApi_validation

View in SonarQube

@@ -751,6 +777,7 @@

Если РазличаютсяТипы Тогда
ПредставлениеОжидаемыхТипов = СтрСоединить(ОписаниеТипа.Типы(), "; ");
ПредставлениеОжидаемыхТипов = СтрЗаменить(ПредставлениеОжидаемыхТипов, "; Null", "; Null; Неопределено");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А не красивее будет добавить в описание типов неопределено?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это невозможно, платформа игнорирует тип Неопределено при описании типа.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Некорректно работает валидация null
2 participants