Skip to content

Commit

Permalink
Merge pull request #4212 from microsoft/feature/python-uri-form-seria…
Browse files Browse the repository at this point in the history
…lization

Feature/python uri form serialization
  • Loading branch information
samwelkanda authored Feb 22, 2024
2 parents 9e5b62c + 3ac8c84 commit 5e9d1f8
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Added the init command as part of the experience revamp of [#3356](https://github.com/microsoft/kiota/issues/3356)
- Added uri-form encoded serialization for Python. [#2075](https://github.com/microsoft/kiota/issues/2075)

### Changed

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The following table provides an overview of the languages supported by Kiota and
| Go || [](https://github.com/microsoft/kiota-abstractions-go) | [FORM](https://github.com/microsoft/kiota-serialization-form-go), [JSON](https://github.com/microsoft/kiota-serialization-json-go), [MULTIPART](https://github.com/microsoft/kiota-serialization-multipart-go), [TEXT](https://github.com/microsoft/kiota-serialization-text-go) | [Anonymous](https://github.com/microsoft/kiota-abstractions-go/blob/main/authentication/anonymous_authentication_provider.go), [API Key](https://github.com/microsoft/kiota-abstractions-go/blob/main/authentication/api_key_authentication_provider.go), [Azure](https://github.com/microsoft/kiota-authentication-azure-go/) | [](https://github.com/microsoft/kiota-http-go/) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/go) |
| Java | ✔ | [✔](https://github.com/microsoft/kiota-java/tree/main/components/abstractions) | [FORM](https://github.com/microsoft/kiota-java/tree/main/components/serialization/form), [JSON](https://github.com/microsoft/kiota-java/tree/main/components/serialization/json), [MULTIPART](https://github.com/microsoft/kiota-java/tree/main/components/serialization/multipart), [TEXT](https://github.com/microsoft/kiota-java/tree/main/components/serialization/text) | [Anonymous](https://github.com/microsoft/kiota-java/blob/main/components/abstractions/src/main/java/com/microsoft/kiota/authentication/AnonymousAuthenticationProvider.java), [API Key](https://github.com/microsoft/kiota-java/blob/main/components/abstractions/src/main/java/com/microsoft/kiota/authentication/ApiKeyAuthenticationProvider.java), [Azure](https://github.com/microsoft/kiota-java/tree/main/components/authentication/azure) | [✔](https://github.com/microsoft/kiota-java/tree/main/components/http/okHttp) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/java) |
| PHP || [](https://github.com/microsoft/kiota-abstractions-php) | [JSON](https://github.com/microsoft/kiota-serialization-json-php), [❌ FORM](https://github.com/microsoft/kiota/issues/2074), [❌ MULTIPART](https://github.com/microsoft/kiota/issues/3029), [TEXT](https://github.com/microsoft/kiota-serialization-text-php) | [Anonymous](https://github.com/microsoft/kiota-abstractions-php/blob/main/src/Authentication/AnonymousAuthenticationProvider.php), [✔️ PHP League](https://github.com/microsoft/kiota-authentication-phpleague-php) | [](https://github.com/microsoft/kiota-http-guzzle-php) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/php) |
| Python || [](https://github.com/microsoft/kiota-abstractions-python) | [FORM](https://github.com/microsoft/kiota/issues/2075), [JSON](https://github.com/microsoft/kiota-serialization-json-python), [❌ MULTIPART](https://github.com/microsoft/kiota/issues/3030), [TEXT](https://github.com/microsoft/kiota-serialization-text-python) | [Anonymous](https://github.com/microsoft/kiota-abstractions-python/blob/main/kiota_abstractions/authentication/anonymous_authentication_provider.py), [Azure](https://github.com/microsoft/kiota-authentication-azure-python) | [](https://github.com/microsoft/kiota-http-python) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/python) |
| Python || [](https://github.com/microsoft/kiota-abstractions-python) | [FORM](https://github.com/microsoft/kiota-serialization-form-python), [JSON](https://github.com/microsoft/kiota-serialization-json-python), [❌ MULTIPART](https://github.com/microsoft/kiota/issues/3030), [TEXT](https://github.com/microsoft/kiota-serialization-text-python) | [Anonymous](https://github.com/microsoft/kiota-abstractions-python/blob/main/kiota_abstractions/authentication/anonymous_authentication_provider.py), [Azure](https://github.com/microsoft/kiota-authentication-azure-python) | [](https://github.com/microsoft/kiota-http-python) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/python) |
| Ruby || [](https://github.com/microsoft/kiota-abstractions-ruby) | [❌ FORM](https://github.com/microsoft/kiota/issues/2077), [JSON](https://github.com/microsoft/kiota-serialization-json-ruby), [❌ MULTIPART](https://github.com/microsoft/kiota/issues/3032), [❌ TEXT](https://github.com/microsoft/kiota/issues/1049) | [Anonymous](https://github.com/microsoft/kiota-abstractions-ruby/blob/main/lib/microsoft_kiota_abstractions/authentication/anonymous_authentication_provider.rb), [✔️ OAuth2](https://github.com/microsoft/kiota-authentication-oauth-ruby) | [](https://github.com/microsoft/kiota-http-ruby)| |
| CLI || (see CSharp) + [](https://github.com/microsoft/kiota-cli-commons) | (see CSharp) | (see CSharp) | (see CSharp) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/cli) |
| Swift | [](https://github.com/microsoft/kiota/issues/1449) | [](./abstractions/swift) | [❌ FORM](https://github.com/microsoft/kiota/issues/2076), [❌ JSON](https://github.com/microsoft/kiota/issues/1451), [❌ FORM](https://github.com/microsoft/kiota/issues/3033), [❌ TEXT](https://github.com/microsoft/kiota/issues/1452) | [Anonymous](./abstractions/swift/Source/MicrosoftKiotaAbstractions/Authentication/AnonymousAuthenticationProvider.swift), [❌ Azure](https://github.com/microsoft/kiota/issues/1453) | [](https://github.com/microsoft/kiota/issues/1454)| |
Expand Down
11 changes: 6 additions & 5 deletions it/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ name = "integration-test"
authors = [{name = "Microsoft", email = "[email protected]"}]
dependencies = [
"uritemplate >=4.1.1",
"microsoft-kiota-abstractions >= 0.6.0",
"microsoft-kiota-http >= 0.4.4",
"microsoft-kiota-authentication-azure >= 0.2.0",
"microsoft-kiota-serialization-json >= 0.3.7",
"microsoft-kiota-serialization-text >= 0.2.1"
"microsoft-kiota-abstractions >= 1.0.0",
"microsoft-kiota-http >= 1.0.0",
"microsoft-kiota-authentication-azure >= 1.0.0",
"microsoft-kiota-serialization-json >= 1.0.0",
"microsoft-kiota-serialization-text >= 1.0.0",
"microsoft-kiota-serialization-form >= 0.1.0",
]
license = {file = "LICENSE"}
readme = "README.md"
Expand Down
2 changes: 2 additions & 0 deletions it/python/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ microsoft-kiota-serialization-json==1.0.1

microsoft-kiota-serialization-text==1.0.0

microsoft-kiota-serialization-form==0.1.0

msal==1.26.0

msal-extensions==1.1.0
Expand Down
6 changes: 4 additions & 2 deletions src/Kiota.Builder/Refiners/PythonRefiner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,17 @@ public override Task Refine(CodeNamespace generatedCode, CancellationToken cance
defaultConfiguration.Serializers,
new(StringComparer.OrdinalIgnoreCase) {
"kiota_serialization_json.json_serialization_writer_factory.JsonSerializationWriterFactory",
"kiota_serialization_text.text_serialization_writer_factory.TextSerializationWriterFactory"
"kiota_serialization_text.text_serialization_writer_factory.TextSerializationWriterFactory",
"kiota_serialization_form.form_serialization_writer_factory.FormSerializationWriterFactory",
}
);
ReplaceDefaultDeserializationModules(
generatedCode,
defaultConfiguration.Deserializers,
new(StringComparer.OrdinalIgnoreCase) {
"kiota_serialization_json.json_parse_node_factory.JsonParseNodeFactory",
"kiota_serialization_text.text_parse_node_factory.TextParseNodeFactory"
"kiota_serialization_text.text_parse_node_factory.TextParseNodeFactory",
"kiota_serialization_form.form_parse_node_factory.FormParseNodeFactory",
}
);
AddSerializationModulesImport(generatedCode,
Expand Down
4 changes: 4 additions & 0 deletions src/kiota/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@
{
"Name": "microsoft-kiota-serialization-text",
"Version": "1.0.0"
},
{
"Name": "microsoft-kiota-serialization-form",
"Version": "0.1.0"
}
],
"DependencyInstallCommand": "pip install {0}=={1}"
Expand Down

0 comments on commit 5e9d1f8

Please sign in to comment.