microsoft / kiota

OpenAPI based HTTP Client code generator
https://aka.ms/kiota/docs
MIT License
2.86k stars 195 forks source link

[Python] --additional-data false removes ALL properties on generated Python code models #4643

Closed pjmagee closed 2 months ago

pjmagee commented 4 months ago

What are you generating using Kiota, clients or plugins?

API Client/SDK

In what context or format are you using Kiota?

Nuget tool

Client library/SDK language

None

Describe the bug

foreach ($spec in $specs) {

    $spec.languageSettings | ForEach-Object {
        $language = $_.language
        $namespace = $_.namespace
        $output = $_.output

        Write-Host "Generating for $($spec.url)"

        docker run -v ${PWD}/examples:/app/output mcr.microsoft.com/openapi/kiota:1.14.0 generate `
            --output /app/output/$language/$output `
            --language $language `
            --namespace-name $namespace `
            --openapi $($spec.url) `
            --exclude-backward-compatible true `
            --log-level Debug `
            --clean-output `
            --additional-data false `
            --class-name ApiClient
    }
}    

The generated Python code with --additional-data false breaks the generated python

Expected behavior

To not remove the fields... see example of running the generator a 2nd time with Git history showing the changes...

image image image

How to reproduce

Generate with the flag set to true and then generate again with it set to false.

Open API description file

Seems to be any openapi specification, as it occurs with all 3 openapi documents I am dealing with.

Kiota Version

1.14.0

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

No response

Known Workarounds

Unknown, will have to ensure the flag is still set to true for Python only.

Configuration

Win11 running docker mcr.microsoft.com/openapi/kiota:1.14.0

Debug output

Click to expand log ``` Hint: use the info command to get the list of dependencies you need to add to your project. Example: kiota info -d "https://developer.icis.com/portals/api/sites/icis-live-portal/liveportal/apis/lnganalyticsapi/download_spec" -l Java Hint: use the --include-path and --exclude-path options with glob patterns to filter the paths generated. Example: kiota generate --include-path "**/foo" -d "https://developer.icis.com/portals/api/sites/icis-live-portal/liveportal/apis/lnganalyticsapi/download_spec" Generating for https://developer.icis.com/portals/api/sites/icis-live-portal/liveportal/apis/lnganalyticsapi/download_spec info: Kiota.Builder.KiotaBuilder[0] Cleaning output directory /app/output/Python/lnganalytics dbug: Kiota.Builder.KiotaBuilder[0] kiota version 1.14.0 dbug: Kiota.Builder.KiotaBuilder[0] cache file /tmp/kiota/cache/generation/5A0BABF09B68A6E28F55D7E23347DD3239C41A4BE33096C5882D067794222D1B/download_spec not found, downloading from https://developer.icis.com/portals/api/sites/icis-live-portal/liveportal/apis/lnganalyticsapi/download_spec info: Kiota.Builder.KiotaBuilder[0] loaded description from remote source dbug: Kiota.Builder.KiotaBuilder[0] step 1 - reading the stream - took 00:00:00.6836112 warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1basinTightnessScenarios/get/responses/200/content/application~1vnd.api+json/example/data/0/id - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1basinTightnessScenarios/get/responses/200/content/application~1vnd.api+json/example/data/0/attributes/created - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1basinTightnessScenarios/get/responses/200/content/application~1vnd.api+json/example/data/0/attributes/month - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1basinTightnessScenarios/get/responses/200/content/application~1vnd.api+json/example/data/1/id - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1basinTightnessScenarios/get/responses/200/content/application~1vnd.api+json/example/data/1/attributes/created - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1basinTightnessScenarios/get/responses/200/content/application~1vnd.api+json/example/data/1/attributes/month - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1basinTightnessScenarios~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/id - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1basinTightnessScenarios~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/created - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1basinTightnessScenarios~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/month - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/originDetails/mass - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/originDetails/volume - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/originDetails/energyContent - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/destinationDetails/mass - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/destinationDetails/volume - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/destinationDetails/energyContent - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/originDetails/mass - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/originDetails/volume - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/originDetails/energyContent - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/destinationDetails/mass - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/destinationDetails/volume - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/destinationDetails/energyContent - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/originDetails/mass - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/originDetails/volume - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/originDetails/energyContent - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/destinationDetails/mass - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/destinationDetails/volume - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1cargoes~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/destinationDetails/energyContent - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1charters/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/startDateEarliest - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1charters/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/startDateLatest - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1charters/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/endDateEarliest - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1charters/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/endDateLatest - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1charters/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/startDateEarliest - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1charters/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/startDateLatest - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1charters/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/endDateEarliest - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1charters/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/endDateLatest - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1charters~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/startDateEarliest - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1charters~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/startDateLatest - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1charters~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/endDateEarliest - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1charters~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/endDateLatest - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1forecasts/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/publishDate - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1forecasts/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/startDate - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1forecasts/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/endDate - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1forecasts/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/publishDate - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1forecasts/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/startDate - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1forecasts/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/endDate - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1forecasts~1{id}/get/responses/200/content/application~1vnd.api+json/example/data - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1forecastValues/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/0/attributes/date - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1forecastValues/get/responses/200/content/application~1vnd.api+json/examples/example/value/data/1/attributes/date - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1forecastValues~1{id}/get/responses/200/content/application~1vnd.api+json/example/data - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1netbacks/get/responses/200/content/application~1vnd.api+json/example/data/0/attributes/created - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1netbacks/get/responses/200/content/application~1vnd.api+json/example/data/0/attributes/costAtOrigin - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1netbacks/get/responses/200/content/application~1vnd.api+json/example/data/0/attributes/bunkerPrice - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1netbacks/get/responses/200/content/application~1vnd.api+json/example/data/0/attributes/absoluteProfit - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1netbacks/get/responses/200/content/application~1vnd.api+json/example/data/1/attributes/created - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1netbacks/get/responses/200/content/application~1vnd.api+json/example/data/1/attributes/costAtOrigin - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1netbacks/get/responses/200/content/application~1vnd.api+json/example/data/1/attributes/bunkerPrice - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1netbacks/get/responses/200/content/application~1vnd.api+json/example/data/1/attributes/absoluteProfit - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1netbacks~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/created - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1netbacks~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/costAtOrigin - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1netbacks~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/bunkerPrice - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1netbacks~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/absoluteProfit - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1transactions/get/responses/200/content/application~1vnd.api+json/example/data/0/attributes/transactionOrder - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1transactions/get/responses/200/content/application~1vnd.api+json/example/data/0/attributes/price/high - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1transactions/get/responses/200/content/application~1vnd.api+json/example/data/0/attributes/startDate - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1transactions/get/responses/200/content/application~1vnd.api+json/example/data/0/attributes/endDate - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1transactions/get/responses/200/content/application~1vnd.api+json/example/data/1/attributes/transactionOrder - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1transactions/get/responses/200/content/application~1vnd.api+json/example/data/1/attributes/startDate - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1transactions/get/responses/200/content/application~1vnd.api+json/example/data/1/attributes/endDate - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1transactions~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/transactionOrder - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1transactions~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/price/high - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1transactions~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/startDate - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1transactions~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/endDate - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1vessels/get/responses/200/content/application~1vnd.api+json/example/data/0/attributes/capacity - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1vessels/get/responses/200/content/application~1vnd.api+json/example/data/1/attributes/capacity - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/paths/~1vessels~1{id}/get/responses/200/content/application~1vnd.api+json/example/data/attributes/capacity - Data and type mismatch found. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/components/schemas/CargoModel/properties/attributes/properties/originDetails/properties/mass - The format integer is not supported by Kiota for the type number and the string type will be used. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/components/schemas/CargoModel/properties/attributes/properties/originDetails/properties/volume - The format integer is not supported by Kiota for the type number and the string type will be used. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/components/schemas/CargoModel/properties/attributes/properties/originDetails/properties/energyContent - The format integer is not supported by Kiota for the type number and the string type will be used. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/components/schemas/CargoModel/properties/attributes/properties/destinationDetails/properties/mass - The format integer is not supported by Kiota for the type number and the string type will be used. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/components/schemas/CargoModel/properties/attributes/properties/destinationDetails/properties/volume - The format integer is not supported by Kiota for the type number and the string type will be used. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/components/schemas/CargoModel/properties/attributes/properties/destinationDetails/properties/energyContent - The format integer is not supported by Kiota for the type number and the string type will be used. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/components/schemas/ForecastValueModel/properties/relationships/properties/forecast/properties/data/properties/id - The format string is not supported by Kiota for the type string and the string type will be used. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/components/schemas/TransactionModel/properties/attributes/properties/transactionOrder - The format int is not supported by Kiota for the type number and the string type will be used. warn: Kiota.Builder.KiotaBuilder[0] OpenAPI warning: #/components/schemas/VesselModel/properties/attributes/properties/capacity - The format int is not supported by Kiota for the type number and the string type will be used. dbug: Kiota.Builder.KiotaBuilder[0] step 2 - parsing the document - took 00:00:00.1319134 dbug: Kiota.Builder.KiotaBuilder[0] step 3 - updating generation configuration from kiota extension - took 00:00:00.0001077 dbug: Kiota.Builder.KiotaBuilder[0] step 4 - filtering API paths with patterns - took 00:00:00.0028528 dbug: Kiota.Builder.KiotaBuilder[0] step 5 - checking whether the output should be updated - took 00:00:00.0201661 dbug: Kiota.Builder.KiotaBuilder[0] step 6 - create uri space - took 00:00:00.0020808 dbug: Kiota.Builder.KiotaBuilder[0] InitializeInheritanceIndex 00:00:00.0023986 dbug: Kiota.Builder.KiotaBuilder[0] CreateRequestBuilderClass 00:00:00 dbug: Kiota.Builder.KiotaBuilder[0] MapTypeDefinitions 00:00:00.0088460 dbug: Kiota.Builder.KiotaBuilder[0] TrimInheritedModels 00:00:00 dbug: Kiota.Builder.KiotaBuilder[0] CleanUpInternalState 00:00:00 dbug: Kiota.Builder.KiotaBuilder[0] step 7 - create source model - took 00:00:00.0911265 dbug: Kiota.Builder.KiotaBuilder[0] 108ms: Language refinement applied dbug: Kiota.Builder.KiotaBuilder[0] step 8 - refine by language - took 00:00:00.1090963 dbug: Kiota.Builder.KiotaBuilder[0] step 9 - writing files - took 00:00:01.2042072 dbug: Kiota.Builder.KiotaBuilder[0] cache file /tmp/kiota/cache/generation/5A0BABF09B68A6E28F55D7E23347DD3239C41A4BE33096C5882D067794222D1B/download_spec is up to date and clearCache is False, using it info: Kiota.Builder.KiotaBuilder[0] loaded description from remote source dbug: Kiota.Builder.KiotaBuilder[0] step 10 - writing lock file - took 00:00:00.0142189 Generation completed successfully dbug: Kiota.Builder.KiotaBuilder[0] Api manifest path: /app/apimanifest.json Hint: use the info command to get the list of dependencies you need to add to your project. Example: kiota info -d "https://developer.icis.com/portals/api/sites/icis-live-portal/liveportal/apis/lnganalyticsapi/download_spec" -l Python Hint: use the --include-path and --exclude-path options with glob patterns to filter the paths generated. Example: kiota generate --include-path "**/foo" -d "https://developer.icis.com/portals/api/sites/icis-live-portal/liveportal/apis/lnganalyticsapi/download_spec" ```

Other information

No response

andrueastman commented 4 months ago

Thanks for raising this @pjmagee

It looks like this issue only affect python at the moment as the other languages do not seem to exhibit this behaviour.

The cause here looks be that python properties are written by the CodeMethodWriter rather than the property writer(not exactly sure of the reason why here) which expects the presence of the CodeMethodKind.Constructor method in order to write the types. When the additionalproperties are not present, the constructor is not added as the model does not have any property with a default value(additionalData).

To fix this we probably need to either have the python refiner have the constuctor forceAdd the constructor for model types by passing the Boolean parameter here as well as the Class kinds that may not need the default constructor.

https://github.com/microsoft/kiota/blob/72e70baf817fa9c4783347985ee37f3fa88d3e9b/src/Kiota.Builder/Refiners/CommonLanguageRefiner.cs#L234