Comments (10)
Thanks for the additional information. @shemogumbe to confirm whether this could be the bug he was mentioning. (it's a holiday for him, we'll probably only hear back next week)
from kiota.
Yes, this could be related, classes are generated and nested, the more the nesting, we lose the ability to import the classes
from kiota.
Hi @pjmagee
Thanks for using kiota and for reaching out.
To be clear, is the import path is correct? i.e. is it constructed properly to point to the type to be imported? (no mismatch in structure/casing that you could edit out).
What happens if you create a schema component for the anyof type and refer to that for the items schema? Do you still run into the same issue?
from kiota.
I think because its nested, the import is also broken, so the import path is also kind of incorrect. It also doesnt get picked up correctly.
using Github Copilot, it actually mentions something similar...
from kiota.
I tried to import from the class, but im struggling to change the import statement to getting it to be detected correctly.
from kiota.
Removing the import and doing this seems to be "acceptable" according to Python/PyCharm
"included": lambda n : setattr(self, 'included', n.get_collection_of_object_values(PriceAssessmentsGetResponse.PriceAssessmentsGetResponse_included)),
It has to be fixed up in a few places, but Class.Class
works, couldnt figure out the right import way to get it working with the nested class.
from kiota.
I think this may be part of a larger issue. Looking at the LocationSpreadsGetResponse_included
generated class:
It seems to not generate some of the fields. Unsure if its related to the anyOf
or due to the anyOf
from kiota.
Thanks for the additional information. @shemogumbe do you think this could be the same thing you were referring to in microsoftgraph/msgraph-beta-sdk-python#391 ??
from kiota.
I know our spec isn't perfect, so also confirmed its not a spec specific thing and C# looks to be generating okay.. Just example showing intellisense/properties being generated correctly
from kiota.
@shemogumbe I can see the other issue has been closed, does that mean this one is solved as well?
from kiota.
Related Issues (20)
- When creating a plugin for a OpenAPI description with no operationId, the plugin is created with no functions or runtime info HOT 10
- [Python] --additional-data false removes ALL properties on generated Python code models HOT 1
- Freeze/Stale when generating client HOT 7
- As a developer, I want to have a sliced OpenAPI document with only the endpoints and components used by my solution
- Filter option in VS Code extension is not very useful HOT 2
- Kiota should send properties in OAS declaration order, not alphabetic order HOT 11
- Update auto-project add workflow to filter out PRs from forks
- Go type errors with v1.15.0-preview.202405090001 HOT 3
- C# type errors with v1.15.0-preview.202405090001 HOT 4
- Incorrect parameter ordering for CancellationToken in generated RequestBuilder code HOT 5
- Allow to easily use GitHub Pagination. HOT 8
- Complete PascalCase transformation for C# clients HOT 1
- Fix scripts to auto update Language and project HOT 1
- Regression Failure because of #4615 HOT 1
- "name_to_be_defined" plugin should be changed to "apiplugin" type
- AllOf implementation alignement
- Error when generating an API plugin HOT 3
- Add "Browse" and the "Default" options when selecting an output directory
- Display the name of the client / plugin being edited on API Explorer
- Enable regeneration after a user generates a client or plugin and without closing the description HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kiota.