Openbravo Issue Tracking System - Retail Modules
View Issue Details
0056659Retail ModulesRetail APIpublic2024-10-04 17:372024-11-15 08:05
kchoperena 
fofarril 
urgentminoralways
closedfixed 
5
 
 
No
0056659: Manually documented fields on the swagger that are not explicitly defining if they are nullable are appearing as mandatory
There are properties that needs to be documented manually on the Swagger. In this cases, if the property is not specifying if it is nullable or not, the swagger is showing them as mandatory
Here is the list of entities/fields affected:
EXPORT INVOICELINE:
    - originalInvoiceDocumentNumber
    - originalInvoiceLineId
IMPORT CONTACTINFO:
    - name
IMPORT USERROLES:
    - organization
IMPORT USER:
    - password
EXPORT SHIPMENT:
    - deliveryLocation
    - completelyInvoiced
IMPORT PRODUCT CATEGORY:
    - parentCategory
IMPORT PRICE LIST:
    - organization

IMPORT GOODS MOVEMENT:
    - client
    - date
    - name

EXPORT ORDER LINE:
    - originalSalesOrderDocumentNumber
    - originalOrderLineId
    - returnedQuantity

EXPORT SHIPMENTINOUTLINE:
    - orderLine
        - id
        - lineNo
        - orderDocumentNo
        - grossUnitPrice
        - netUnitPrice
        - currency

IMPORT PRODUCT:
    - assortments

Also there are some fields that doesn't have the nullable defined but appears as mandatory when they are:

IMPORT PRODUCT PRICE EXCEPTION
    - organization
IMPORT INVENTORY LINE:
    - bin
    - product
Check on the swagger any mentioned field definition
Make by default the nullable to false and include a explicit nullable set for the:
IMPORT PRODUCT PRICE EXCEPTION
    - organization
IMPORT INVENTORY LINE:
    - bin

Example:
@Override
  public List<PropertyDocumentation<?>> getPropertyDocumentation() {
    return List.of(new StringPropertyDocumentation("organization")
        .description("The organization for the imported price exception, identified by searchKey").nullable(false));
  }
No tags attached.
related to defect 0056478 closed Rajesh_18 API PRODUCT - assortment 
png Screenshot from 2024-10-04 17-36-52.png (74,464) 2024-10-04 17:37
https://issues.openbravo.com/file_download.php?file_id=20231&type=bug
png
Issue History
2024-10-04 17:37kchoperenaNew Issue
2024-10-04 17:37kchoperenaAssigned To => Triage Platform Conn
2024-10-04 17:37kchoperenaFile Added: Screenshot from 2024-10-04 17-36-52.png
2024-10-04 17:37kchoperenaTriggers an Emergency Pack => No
2024-10-07 10:20kchoperenaRelationship addedrelated to 0056478
2024-10-07 10:47adrianromeroAssigned ToTriage Platform Conn => Retail
2024-10-18 12:10jorgewederagoAssigned ToRetail => jorgewederago
2024-10-18 13:22jorgewederagoAssigned Tojorgewederago => alainperez
2024-10-18 13:22jorgewederagoStatusnew => acknowledged
2024-10-18 14:06alainperezStatusacknowledged => scheduled
2024-11-05 14:59jorgewederagoAssigned Toalainperez => fofarril
2024-11-12 14:27marvintmSeveritymajor => minor
2024-11-12 17:21hgbotNote Added: 0171829
2024-11-15 08:05hgbotNote Added: 0172013
2024-11-15 08:05hgbotResolutionopen => fixed
2024-11-15 08:05hgbotStatusscheduled => closed
2024-11-15 08:05hgbotNote Added: 0172014

Notes
(0171829)
hgbot   
2024-11-12 17:21   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/381 [^]
(0172013)
hgbot   
2024-11-15 08:05   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/381 [^]
(0172014)
hgbot   
2024-11-15 08:05   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.api [^]
Changeset: afc18e285f64fc76139abbfcdd98c894d0750c65
Author: Francisco Javier Deler O'Farril <francisco.ofarril@doceleguas.com>
Date: 15-11-2024 07:05:28
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/commit/afc18e285f64fc76139abbfcdd98c894d0750c65 [^]

Fixes ISSUE-56659: Manually documented fields on the swagger that are not explicitly defining if they are nullable are appearing as mandatory

---
M src/org/openbravo/api/mappings/goodsmovement/ImportGoodsMvmtJavaPropertyMappingHandler.java
M src/org/openbravo/api/mappings/invoiceline/ExportInvoiceLineJavaPropertyMappingHandler.java
M src/org/openbravo/api/mappings/orderline/ExportOrderLineJavaPropertyMappingHandler.java
M src/org/openbravo/api/mappings/pricelist/PriceListJavaPropertyMapping.java
M src/org/openbravo/api/mappings/pricelist/ProductPriceExceptionJavaPropertyMapping.java
M src/org/openbravo/api/mappings/productcategory/ImportProductCategoryJavaPropertyMappingHandler.java
M src/org/openbravo/api/mappings/shipmentinout/ShipmentInOutJavaPropertyMappingHandler.java
M src/org/openbravo/api/mappings/user/ImportContactInfoJavaPropertyMappingHandler.java
M src/org/openbravo/api/mappings/user/ImportUserJavaPropertyMappingHandler.java
M src/org/openbravo/api/mappings/user/ImportUserRolesJavaPropertyMappingHandler.java
---