Closed nilskasseckert closed 3 months ago
Hello, the generator converts the following OData-XML specification:
<Property Name="Content" Type="Edm.Binary" Nullable="false" sap:unicode="false" sap:label="Dateiinhalt" sap:heading="Dateiinhalt (Binärdaten)" sap:quickinfo="Dateiinhalt als binärer Datenstrom" sap:sortable="false" sap:filterable="false"/>
into the following OpenAPI:
"Content": { "type": "string", "format": "base64url" },
This is completely correct for the V4 world and corresponds to the OASIS specification.
For V2, however, it should be base64 and not base64url. SAP says:
OData V2 uses a different alphabet for the base-64 encoding forEdm.binary. OData V2 uses '+' and '/' but OData V4 uses instead '-' and '_'.
If I'm not wrong an if is missing here to handle the different cases: https://github.com/oasis-tcs/odata-openapi/blob/d00aabe484050b51d269c3e524f2915adf852c3d/lib/csdl2openapi.js#L2480C5-L2486C15
Regards, Nils
Hi @nilskasseckert,
Thanks for finding this!
Fix is published with odata-openapi@0.26.1
odata-openapi@0.26.1
Hi @ralfhandl, thanks for the fast fix! Works now!
Hello, the generator converts the following OData-XML specification:
into the following OpenAPI:
This is completely correct for the V4 world and corresponds to the OASIS specification.
For V2, however, it should be base64 and not base64url. SAP says:
If I'm not wrong an if is missing here to handle the different cases: https://github.com/oasis-tcs/odata-openapi/blob/d00aabe484050b51d269c3e524f2915adf852c3d/lib/csdl2openapi.js#L2480C5-L2486C15
Regards, Nils