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

OData V2 Edm.Time is not supported #302

Closed
sosl-beep opened this issue Jul 3, 2024 · 3 comments · Fixed by #303
Closed

OData V2 Edm.Time is not supported #302

sosl-beep opened this issue Jul 3, 2024 · 3 comments · Fixed by #303
Labels

Comments

@sosl-beep
Copy link

sosl-beep commented Jul 3, 2024

Hi,

Version used is 0.25.4

When converting a OData V2 containing properties with type="Edm.Time" the conversion is a success however properties with Edm.Time are converted to

"Name": {
  "nullable": true
},

The following is written to the console: 'Unknown type: Edm.Time'

To replicate the following file from SAP can be used:
2022_FPS_02_OP_API_SALES_ORDER_SRV_0001.txt

Expected behavior is that the property is converted to:

"Name":{
  "type": "string",
  "nullable": true,
  "example": "PT15H51M04S"
}

As a test the correct OpenApi spec should match the one provided by SAP:
2022_FPS_02_OP_API_SALES_ORDER_SRV_0001.json

@ralfhandl
Copy link
Contributor

@sosl-beep This is a bug in the JS-based implementation, whose support for OData V2 is incomplete.

You may want to use the XSLT-based implementation in https://github.com/oasis-tcs/odata-openapi/tree/main/tools, it produces the expected output.

@ralfhandl
Copy link
Contributor

Fixed with version 0.26.0

@ralfhandl ralfhandl linked a pull request Jul 4, 2024 that will close this issue
@sosl-beep
Copy link
Author

Hi @ralfhandl,

Again Awesome work! We really appreciate your effort on this.

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

Successfully merging a pull request may close this issue.

2 participants