Skip to content

Commit

Permalink
Merge pull request #3793 from microsoft/regen/clients-1696597540
Browse files Browse the repository at this point in the history
Update CLI commons dependency to fix build errors
  • Loading branch information
jasonjoh authored Oct 6, 2023
2 parents 1f3b91d + bf75db2 commit 479fbb6
Show file tree
Hide file tree
Showing 58 changed files with 251 additions and 306 deletions.
15 changes: 2 additions & 13 deletions get-started/azure-auth/cli/src/Client/Me/MeRequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,13 @@ namespace GetUserClient.ApiClient.Me {
public class MeRequestBuilder : BaseCliRequestBuilder {
public Command BuildGetCommand() {
var command = new Command("get");
var outputOption = new Option<FormatterType>("--output", () => FormatterType.JSON){
IsRequired = true
};
var outputOption = new Option<FormatterType>("--output", () => FormatterType.JSON);
command.AddOption(outputOption);
var queryOption = new Option<string>("--query");
command.AddOption(queryOption);
var jsonNoIndentOption = new Option<bool>("--json-no-indent", r => {
if (bool.TryParse(r.Tokens.Select(t => t.Value).LastOrDefault(), out var value)) {
return value;
}
return true;
}, description: "Disable indentation for the JSON output formatter.");
command.AddOption(jsonNoIndentOption);
command.SetHandler(async (invocationContext) => {
var output = invocationContext.ParseResult.GetValueForOption(outputOption);
var query = invocationContext.ParseResult.GetValueForOption(queryOption);
var jsonNoIndent = invocationContext.ParseResult.GetValueForOption(jsonNoIndentOption);
IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter");
IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory");
var cancellationToken = invocationContext.GetCancellationToken();
Expand All @@ -45,9 +35,8 @@ public Command BuildGetCommand() {
});
var response = await reqAdapter.SendPrimitiveAsync<Stream>(requestInfo, errorMapping: default, cancellationToken: cancellationToken) ?? Stream.Null;
response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response;
var formatterOptions = output.GetOutputFormatterOptions(new FormatterOptionsModel(!jsonNoIndent));
var formatter = outputFormatterFactory.GetFormatter(output);
await formatter.WriteOutputAsync(response, formatterOptions, cancellationToken);
await formatter.WriteOutputAsync(response, cancellationToken);
});
return command;
}
Expand Down
3 changes: 2 additions & 1 deletion get-started/azure-auth/cli/src/Client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "/home/runner/work/kiota-samples/kiota-samples/get-started/azure-auth/cli/../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.6.1",
"kiotaVersion": "1.7.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "GetUserClient.ApiClient",
"language": "CLI",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
Expand Down
2 changes: 1 addition & 1 deletion get-started/azure-auth/cli/src/GetUserClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="1.3.5" />
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.0.3" />
<PackageReference Include="Microsoft.Kiota.Cli.Commons" Version="0.3.1-preview.1" />
<PackageReference Include="Microsoft.Kiota.Cli.Commons" Version="0.5.0-preview.1" />
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.1.1" />
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.0.1" />
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.0.8" />
Expand Down
3 changes: 2 additions & 1 deletion get-started/azure-auth/dotnet/src/Client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "/home/runner/work/kiota-samples/kiota-samples/get-started/azure-auth/dotnet/../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.6.1",
"kiotaVersion": "1.7.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "GetUserClient.ApiClient",
"language": "CSharp",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
Expand Down
3 changes: 2 additions & 1 deletion get-started/azure-auth/go/client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "/home/runner/work/kiota-samples/kiota-samples/get-started/azure-auth/go/../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.6.1",
"kiotaVersion": "1.7.0",
"clientClassName": "GraphApiClient",
"clientNamespaceName": "getuser/client",
"language": "Go",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
Expand Down
4 changes: 2 additions & 2 deletions get-started/azure-auth/go/client/models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func NewUser()(*User) {
func CreateUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewUser(), nil
}
// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *User) GetAdditionalData()(map[string]any) {
return m.additionalData
}
Expand Down Expand Up @@ -83,7 +83,7 @@ func (m *User) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c49
}
return nil
}
// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *User) SetAdditionalData(value map[string]any)() {
m.additionalData = value
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "/home/runner/work/kiota-samples/kiota-samples/get-started/azure-auth/java/../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.6.1",
"kiotaVersion": "1.7.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "getuserclient.apiclient",
"language": "Java",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ public MeRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakart
super(requestAdapter, "{+baseurl}/me", rawUrl);
}
/**
* @return a CompletableFuture of user
* @return a CompletableFuture of User
*/
@jakarta.annotation.Nonnull
public java.util.concurrent.CompletableFuture<User> get() {
return get(null);
}
/**
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a CompletableFuture of user
* @return a CompletableFuture of User
*/
@jakarta.annotation.Nonnull
public java.util.concurrent.CompletableFuture<User> get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) {
Expand Down Expand Up @@ -79,7 +79,7 @@ public RequestInformation toGetRequestInformation(@jakarta.annotation.Nullable f
/**
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
* @param rawUrl The raw URL to use for the request builder.
* @return a meRequestBuilder
* @return a MeRequestBuilder
*/
@jakarta.annotation.Nonnull
public MeRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ public class User implements AdditionalDataHolder, Parsable {
*/
private String id;
/**
* Instantiates a new user and sets the default values.
* Instantiates a new User and sets the default values.
*/
public User() {
this.setAdditionalData(new HashMap<>());
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a user
* @return a User
*/
@jakarta.annotation.Nonnull
public static User createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new User();
}
/**
* Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a Map<String, Object>
*/
@jakarta.annotation.Nonnull
Expand All @@ -47,7 +47,7 @@ public Map<String, Object> getAdditionalData() {
}
/**
* Gets the displayName property value. The displayName property
* @return a string
* @return a String
*/
@jakarta.annotation.Nullable
public String getDisplayName() {
Expand All @@ -66,7 +66,7 @@ public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers
}
/**
* Gets the id property value. The id property
* @return a string
* @return a String
*/
@jakarta.annotation.Nullable
public String getId() {
Expand All @@ -83,8 +83,8 @@ public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writ
writer.writeAdditionalData(this.getAdditionalData());
}
/**
* Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param value Value to set for the additionalData property.
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param value Value to set for the AdditionalData property.
*/
public void setAdditionalData(@jakarta.annotation.Nullable final Map<String, Object> value) {
this.additionalData = value;
Expand Down
6 changes: 3 additions & 3 deletions get-started/azure-auth/php/client/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): User
}

/**
* Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return array<string, mixed>|null
*/
public function getAdditionalData(): ?array {
Expand Down Expand Up @@ -87,8 +87,8 @@ public function serialize(SerializationWriter $writer): void {
}

/**
* Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param array<string,mixed> $value Value to set for the additionalData property.
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param array<string,mixed> $value Value to set for the AdditionalData property.
*/
public function setAdditionalData(?array $value): void {
$this->additionalData = $value;
Expand Down
3 changes: 2 additions & 1 deletion get-started/azure-auth/php/client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "/home/runner/work/kiota-samples/kiota-samples/get-started/azure-auth/php/../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.6.1",
"kiotaVersion": "1.7.0",
"clientClassName": "GraphApiClient",
"clientNamespaceName": "GetUser\\Client",
"language": "PHP",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
Expand Down
3 changes: 2 additions & 1 deletion get-started/azure-auth/python/client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "/home/runner/work/kiota-samples/kiota-samples/get-started/azure-auth/python/../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.6.1",
"kiotaVersion": "1.7.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "client",
"language": "Python",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def with_url(self,raw_url: Optional[str] = None) -> MeRequestBuilder:
"""
if not raw_url:
raise TypeError("raw_url cannot be null.")
return MeRequestBuilder(raw_url, self.request_adapter)
return MeRequestBuilder(self.request_adapter, raw_url)

from kiota_abstractions.base_request_configuration import BaseRequestConfiguration

Expand Down
3 changes: 2 additions & 1 deletion get-started/azure-auth/ruby/client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "/home/runner/work/kiota-samples/kiota-samples/get-started/azure-auth/ruby/../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.6.1",
"kiotaVersion": "1.7.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "GetUser",
"language": "Ruby",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
Expand Down
6 changes: 3 additions & 3 deletions get-started/azure-auth/ruby/client/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ class User
# The id property
@id
##
## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
## @return a i_dictionary
##
def additional_data
return @additional_data
end
##
## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
## @param value Value to set for the additionalData property.
## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
## @param value Value to set for the AdditionalData property.
## @return a void
##
def additional_data=(value)
Expand Down
5 changes: 5 additions & 0 deletions get-started/azure-auth/typescript/client/getUserApiClient.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// tslint:disable
// eslint-disable
// Generated by Microsoft Kiota
import { MeRequestBuilder } from './me/meRequestBuilder';
import { BaseRequestBuilder, enableBackingStoreForSerializationWriterFactory, ParseNodeFactoryRegistry, registerDefaultDeserializer, registerDefaultSerializer, SerializationWriterFactoryRegistry, type RequestAdapter } from '@microsoft/kiota-abstractions';
import { FormParseNodeFactory, FormSerializationWriterFactory } from '@microsoft/kiota-serialization-form';
Expand Down Expand Up @@ -34,3 +37,5 @@ export class GetUserApiClient extends BaseRequestBuilder {
this.pathParameters["baseurl"] = requestAdapter.baseUrl;
};
}
// tslint:enable
// eslint-enable
3 changes: 2 additions & 1 deletion get-started/azure-auth/typescript/client/kiota-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"descriptionHash": "126B1DCD90D419BD411E85DB2452D7D395405237ACF715ECB02992FB92848451D51D4254758E106D7281F10FCEA55629636227F3DC5AFB2550A04CB944BD6EE1",
"descriptionLocation": "/home/runner/work/kiota-samples/kiota-samples/get-started/azure-auth/typescript/../get-me.yml",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.6.1",
"kiotaVersion": "1.7.0",
"clientClassName": "GetUserApiClient",
"clientNamespaceName": "ApiSdk",
"language": "TypeScript",
"usesBackingStore": false,
"excludeBackwardCompatible": false,
"includeAdditionalData": true,
"serializers": [
"Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory",
Expand Down
2 changes: 1 addition & 1 deletion get-started/azure-auth/typescript/client/me/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './meRequestBuilderGetRequestConfiguration'
export * from './meRequestBuilder'
18 changes: 16 additions & 2 deletions get-started/azure-auth/typescript/client/me/meRequestBuilder.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
// tslint:disable
// eslint-disable
// Generated by Microsoft Kiota
import { type User } from '../models/';
import { createUserFromDiscriminatorValue } from '../models/createUserFromDiscriminatorValue';
import { type MeRequestBuilderGetRequestConfiguration } from './meRequestBuilderGetRequestConfiguration';
import { createUserFromDiscriminatorValue } from '../models/user';
import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestOption } from '@microsoft/kiota-abstractions';

export interface MeRequestBuilderGetRequestConfiguration {
/**
* Request headers
*/
headers?: Record<string, string[]>;
/**
* Request options
*/
options?: RequestOption[];
}
/**
* Builds and executes requests for operations under /me
*/
Expand Down Expand Up @@ -51,3 +63,5 @@ export class MeRequestBuilder extends BaseRequestBuilder {
return new MeRequestBuilder(rawUrl, this.requestAdapter);
};
}
// tslint:enable
// eslint-enable

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions get-started/azure-auth/typescript/client/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export * from './createUserFromDiscriminatorValue'
export * from './deserializeIntoUser'
export * from './serializeUser'
export * from './user'
Loading

0 comments on commit 479fbb6

Please sign in to comment.