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

openapi spec generated by Kiota is in version 3.0.4 #5944

Open
KennethBWSong opened this issue Dec 31, 2024 · 2 comments · May be fixed by APIDevTools/swagger-parser#264
Open

openapi spec generated by Kiota is in version 3.0.4 #5944

KennethBWSong opened this issue Dec 31, 2024 · 2 comments · May be fixed by APIDevTools/swagger-parser#264
Labels
status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question

Comments

@KennethBWSong
Copy link

What are you generating using Kiota, clients or plugins?

Kiota plugin

In what context or format are you using Kiota?

Source Build

Client library/SDK language

None

Describe the bug

When trying TTK with latest prelease kiota extension (1.22.24122701), we found the version in openapi spec generated under tmp/kiota-xxx/appPackage is "3.0.4", however the version in original openapi spec is "3.0.0".
Kiota generated:
Image
originial:
Image

Expected behavior

Kiota should generate the openapi with same version of original file

How to reproduce

Create a DC + Plugin from TTK
Select OpenAPI Spec
Choose a local openapi spec with version 3.0.0
Click generate and create TTK project.

Open API description file

No response

Kiota Version

v1.22.0-preview.202412260001

Latest Kiota version known to work for scenario above?(Not required)

No response

Known Workarounds

No response

Configuration

No response

Debug output

Click to expand log ```
</details>


### Other information

_No response_
@KennethBWSong KennethBWSong added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Dec 31, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Dec 31, 2024
@baywet
Copy link
Member

baywet commented Dec 31, 2024

Hi @KennethBWSong
Thank you for using kiota and for reaching out.

The version being emitted is hardcoded in the library used to parse/serialize documents

I'd also argue that upgrading the version is the correct behaviour since the document has been parsed, modified in memory, and serialized according to the latest version of the specification.

Can you please expand on why this patch version is a problem?

For reference, the previously emitted version was 3.0.1 (so not the original version of the document either).

@baywet baywet added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question and removed type:bug A broken experience status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Dec 31, 2024
@baywet baywet moved this from Needs Triage 🔍 to Waits for author 🔁 in Kiota Dec 31, 2024
@baywet
Copy link
Member

baywet commented Dec 31, 2024

For other readers, this is an issue because the OP's parsing library hasn't updated their version check. PR has been sent.
APIDevTools/swagger-parser#264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question
Projects
Status: Waits for author 🔁
Development

Successfully merging a pull request may close this issue.

2 participants