Openbravo Issue Tracking System - Retail Modules
View Issue Details
0056234Retail ModulesRetail APIpublic2024-08-09 14:232024-08-13 10:09
kchoperena 
Triage Platform Conn 
normalmajoralways
closedfixed 
5
 
 
No
0056234: There is no mandatory asterisk in the swagger when a field is not nullable in a JavaPropertyMappingHandler documentation
In a JavaPropertyMappingHandler, a field that is used on the API should be documented manually. The manual documentation allows to set a field as nullable or not

In a direct property mapping, when a field is marked as "Accepts Null Vallues='N'" in the swagger a red asterisk appears to denote that it is a mandatory field

This is not happening in the Java property mapping handlers when the field is set as not nullable
Check the locations list on the Import BusinessPartner API:

https://livebuilds.openbravo.com/context/retail_modules_pgsql_pi/api#/BusinessPartner/Import_BusinessPartner [^]

Attached a screenshot
No tags attached.
related to defect 0056478 closed Rajesh_18 API PRODUCT - assortment 
png Screenshot from 2024-08-09 14-23-00.png (45,529) 2024-08-09 14:23
https://issues.openbravo.com/file_download.php?file_id=20082&type=bug
png
Issue History
2024-08-09 14:23kchoperenaNew Issue
2024-08-09 14:23kchoperenaAssigned To => Triage Platform Conn
2024-08-09 14:23kchoperenaTriggers an Emergency Pack => No
2024-08-09 14:23kchoperenaFile Added: Screenshot from 2024-08-09 14-23-00.png
2024-08-12 09:33hgbotNote Added: 0167949
2024-08-12 09:55hgbotResolutionopen => fixed
2024-08-12 09:55hgbotStatusnew => closed
2024-08-12 09:55hgbotNote Added: 0167954
2024-08-12 09:55hgbotNote Added: 0167955
2024-08-13 10:09hgbotNote Added: 0168006
2024-09-19 13:57Rajesh_18Relationship addedrelated to 0056478

Notes
(0167949)
hgbot   
2024-08-12 09:33   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/321 [^]
(0167954)
hgbot   
2024-08-12 09:55   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.api [^]
Changeset: abdad8f354260735d614e960b0bbf1fd69bcaa3e
Author: Kepa Choperena <kepa.choperena@openbravo.com>
Date: 12-08-2024 07:55:37
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/commit/abdad8f354260735d614e960b0bbf1fd69bcaa3e [^]

fixes BUG-56234: Inconsistent display of mandatory properties in Swagger

  For the shake of consistency, we are declaring the java properties that do not accept null values as mandatory instead of as non nullable. After this change, an asterisk (*) is appearing next to them in Swagger UI, the same behavior of the properties defined through AD.

---
M src/org/openbravo/api/openapi/ApiPropertyDocumentationTransformer.java
---
(0167955)
hgbot   
2024-08-12 09:55   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/321 [^]
(0168006)
hgbot   
2024-08-13 10:09   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.api [^]
Changeset: 912f384efa5a80c25645b81c1bdc44c95c8be5ec
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 13-08-2024 10:09:13
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/commit/912f384efa5a80c25645b81c1bdc44c95c8be5ec [^]

related to BUG-56234: adapt test

---
M src-test/org/openbravo/api/openapi/ApiPropertyDocumentationTransformerTest.java
---