Skip to content

Commit 8dc2ecf

Browse files
authored
refactor(sdk): rename getJsonSchema to getIdentitySchema (#2606)
BREAKING CHANGE: SDK Method `getJsonSchema` was renamed to `getIdentitySchema`.
1 parent 94a3741 commit 8dc2ecf

File tree

11 files changed

+120
-122
lines changed

11 files changed

+120
-122
lines changed

cmd/identities/validate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Identities can be supplied via STD_IN or JSON files containing a single or an ar
5353

5454
for src, i := range is {
5555
err = ValidateIdentity(cmd, src, i, func(ctx context.Context, id string) (map[string]interface{}, *http.Response, error) {
56-
return c.V0alpha2Api.GetJsonSchema(ctx, id).Execute()
56+
return c.V0alpha2Api.GetIdentitySchema(ctx, id).Execute()
5757
})
5858
if err != nil {
5959
return err

internal/httpclient/.openapi-generator/FILES

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ docs/IdentityCredentialsOidc.md
2727
docs/IdentityCredentialsOidcProvider.md
2828
docs/IdentityCredentialsPassword.md
2929
docs/IdentityCredentialsType.md
30-
docs/IdentitySchema.md
30+
docs/IdentitySchemaContainer.md
3131
docs/IdentityState.md
3232
docs/InlineResponse200.md
3333
docs/InlineResponse2001.md
@@ -119,7 +119,7 @@ model_identity_credentials_oidc.go
119119
model_identity_credentials_oidc_provider.go
120120
model_identity_credentials_password.go
121121
model_identity_credentials_type.go
122-
model_identity_schema.go
122+
model_identity_schema_container.go
123123
model_identity_state.go
124124
model_inline_response_200.go
125125
model_inline_response_200_1.go

internal/httpclient/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Class | Method | HTTP request | Description
9797
*V0alpha2Api* | [**AdminPatchIdentity**](docs/V0alpha2Api.md#adminpatchidentity) | **Patch** /admin/identities/{id} | Partially updates an Identity's field using [JSON Patch](https://jsonpatch.com/)
9898
*V0alpha2Api* | [**AdminUpdateIdentity**](docs/V0alpha2Api.md#adminupdateidentity) | **Put** /admin/identities/{id} | Update an Identity
9999
*V0alpha2Api* | [**CreateSelfServiceLogoutFlowUrlForBrowsers**](docs/V0alpha2Api.md#createselfservicelogoutflowurlforbrowsers) | **Get** /self-service/logout/browser | Create a Logout URL for Browsers
100-
*V0alpha2Api* | [**GetJsonSchema**](docs/V0alpha2Api.md#getjsonschema) | **Get** /schemas/{id} |
100+
*V0alpha2Api* | [**GetIdentitySchema**](docs/V0alpha2Api.md#getidentityschema) | **Get** /schemas/{id} |
101101
*V0alpha2Api* | [**GetSelfServiceError**](docs/V0alpha2Api.md#getselfserviceerror) | **Get** /self-service/errors | Get Self-Service Errors
102102
*V0alpha2Api* | [**GetSelfServiceLoginFlow**](docs/V0alpha2Api.md#getselfserviceloginflow) | **Get** /self-service/login/flows | Get Login Flow
103103
*V0alpha2Api* | [**GetSelfServiceRecoveryFlow**](docs/V0alpha2Api.md#getselfservicerecoveryflow) | **Get** /self-service/recovery/flows | Get Recovery Flow
@@ -151,7 +151,7 @@ Class | Method | HTTP request | Description
151151
- [IdentityCredentialsOidcProvider](docs/IdentityCredentialsOidcProvider.md)
152152
- [IdentityCredentialsPassword](docs/IdentityCredentialsPassword.md)
153153
- [IdentityCredentialsType](docs/IdentityCredentialsType.md)
154-
- [IdentitySchema](docs/IdentitySchema.md)
154+
- [IdentitySchemaContainer](docs/IdentitySchemaContainer.md)
155155
- [IdentityState](docs/IdentityState.md)
156156
- [InlineResponse200](docs/InlineResponse200.md)
157157
- [InlineResponse2001](docs/InlineResponse2001.md)

internal/httpclient/api/openapi.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ paths:
678678
/schemas/{id}:
679679
get:
680680
description: Get a JSON Schema
681-
operationId: getJsonSchema
681+
operationId: getIdentitySchema
682682
parameters:
683683
- description: ID must be set to the ID of schema you want to get
684684
explode: false
@@ -693,8 +693,8 @@ paths:
693693
content:
694694
application/json:
695695
schema:
696-
$ref: '#/components/schemas/jsonSchema'
697-
description: jsonSchema
696+
$ref: '#/components/schemas/identitySchema'
697+
description: identitySchema
698698
"404":
699699
content:
700700
application/json:
@@ -3379,6 +3379,9 @@ components:
33793379
title: A list of identities.
33803380
type: array
33813381
identitySchema:
3382+
description: Raw JSON Schema
3383+
type: object
3384+
identitySchemaContainer:
33823385
example:
33833386
schema: '{}'
33843387
id: id
@@ -3387,13 +3390,13 @@ components:
33873390
description: The ID of the Identity JSON Schema
33883391
type: string
33893392
schema:
3390-
description: The actual Identity JSON Schema
3393+
description: Raw JSON Schema
33913394
type: object
33923395
type: object
33933396
identitySchemas:
33943397
description: Raw identity Schema list
33953398
items:
3396-
$ref: '#/components/schemas/identitySchema'
3399+
$ref: '#/components/schemas/identitySchemaContainer'
33973400
type: array
33983401
identityState:
33993402
description: The state can either be `active` or `inactive`.
@@ -3461,9 +3464,6 @@ components:
34613464
items:
34623465
$ref: '#/components/schemas/jsonPatch'
34633466
type: array
3464-
jsonSchema:
3465-
description: Raw JSON Schema
3466-
type: object
34673467
needsPrivilegedSessionError:
34683468
properties:
34693469
code:

internal/httpclient/api_v0alpha2.go

+20-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/httpclient/docs/IdentitySchema.md renamed to internal/httpclient/docs/IdentitySchemaContainer.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,78 @@
1-
# IdentitySchema
1+
# IdentitySchemaContainer
22

33
## Properties
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**Id** | Pointer to **string** | The ID of the Identity JSON Schema | [optional]
8-
**Schema** | Pointer to **map[string]interface{}** | The actual Identity JSON Schema | [optional]
8+
**Schema** | Pointer to **map[string]interface{}** | Raw JSON Schema | [optional]
99

1010
## Methods
1111

12-
### NewIdentitySchema
12+
### NewIdentitySchemaContainer
1313

14-
`func NewIdentitySchema() *IdentitySchema`
14+
`func NewIdentitySchemaContainer() *IdentitySchemaContainer`
1515

16-
NewIdentitySchema instantiates a new IdentitySchema object
16+
NewIdentitySchemaContainer instantiates a new IdentitySchemaContainer object
1717
This constructor will assign default values to properties that have it defined,
1818
and makes sure properties required by API are set, but the set of arguments
1919
will change when the set of required properties is changed
2020

21-
### NewIdentitySchemaWithDefaults
21+
### NewIdentitySchemaContainerWithDefaults
2222

23-
`func NewIdentitySchemaWithDefaults() *IdentitySchema`
23+
`func NewIdentitySchemaContainerWithDefaults() *IdentitySchemaContainer`
2424

25-
NewIdentitySchemaWithDefaults instantiates a new IdentitySchema object
25+
NewIdentitySchemaContainerWithDefaults instantiates a new IdentitySchemaContainer object
2626
This constructor will only assign default values to properties that have it defined,
2727
but it doesn't guarantee that properties required by API are set
2828

2929
### GetId
3030

31-
`func (o *IdentitySchema) GetId() string`
31+
`func (o *IdentitySchemaContainer) GetId() string`
3232

3333
GetId returns the Id field if non-nil, zero value otherwise.
3434

3535
### GetIdOk
3636

37-
`func (o *IdentitySchema) GetIdOk() (*string, bool)`
37+
`func (o *IdentitySchemaContainer) GetIdOk() (*string, bool)`
3838

3939
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
4040
and a boolean to check if the value has been set.
4141

4242
### SetId
4343

44-
`func (o *IdentitySchema) SetId(v string)`
44+
`func (o *IdentitySchemaContainer) SetId(v string)`
4545

4646
SetId sets Id field to given value.
4747

4848
### HasId
4949

50-
`func (o *IdentitySchema) HasId() bool`
50+
`func (o *IdentitySchemaContainer) HasId() bool`
5151

5252
HasId returns a boolean if a field has been set.
5353

5454
### GetSchema
5555

56-
`func (o *IdentitySchema) GetSchema() map[string]interface{}`
56+
`func (o *IdentitySchemaContainer) GetSchema() map[string]interface{}`
5757

5858
GetSchema returns the Schema field if non-nil, zero value otherwise.
5959

6060
### GetSchemaOk
6161

62-
`func (o *IdentitySchema) GetSchemaOk() (*map[string]interface{}, bool)`
62+
`func (o *IdentitySchemaContainer) GetSchemaOk() (*map[string]interface{}, bool)`
6363

6464
GetSchemaOk returns a tuple with the Schema field if it's non-nil, zero value otherwise
6565
and a boolean to check if the value has been set.
6666

6767
### SetSchema
6868

69-
`func (o *IdentitySchema) SetSchema(v map[string]interface{})`
69+
`func (o *IdentitySchemaContainer) SetSchema(v map[string]interface{})`
7070

7171
SetSchema sets Schema field to given value.
7272

7373
### HasSchema
7474

75-
`func (o *IdentitySchema) HasSchema() bool`
75+
`func (o *IdentitySchemaContainer) HasSchema() bool`
7676

7777
HasSchema returns a boolean if a field has been set.
7878

internal/httpclient/docs/V0alpha2Api.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Method | HTTP request | Description
1515
[**AdminPatchIdentity**](V0alpha2Api.md#AdminPatchIdentity) | **Patch** /admin/identities/{id} | Partially updates an Identity's field using [JSON Patch](https://jsonpatch.com/)
1616
[**AdminUpdateIdentity**](V0alpha2Api.md#AdminUpdateIdentity) | **Put** /admin/identities/{id} | Update an Identity
1717
[**CreateSelfServiceLogoutFlowUrlForBrowsers**](V0alpha2Api.md#CreateSelfServiceLogoutFlowUrlForBrowsers) | **Get** /self-service/logout/browser | Create a Logout URL for Browsers
18-
[**GetJsonSchema**](V0alpha2Api.md#GetJsonSchema) | **Get** /schemas/{id} |
18+
[**GetIdentitySchema**](V0alpha2Api.md#GetIdentitySchema) | **Get** /schemas/{id} |
1919
[**GetSelfServiceError**](V0alpha2Api.md#GetSelfServiceError) | **Get** /self-service/errors | Get Self-Service Errors
2020
[**GetSelfServiceLoginFlow**](V0alpha2Api.md#GetSelfServiceLoginFlow) | **Get** /self-service/login/flows | Get Login Flow
2121
[**GetSelfServiceRecoveryFlow**](V0alpha2Api.md#GetSelfServiceRecoveryFlow) | **Get** /self-service/recovery/flows | Get Recovery Flow
@@ -812,9 +812,9 @@ No authorization required
812812
[[Back to README]](../README.md)
813813

814814

815-
## GetJsonSchema
815+
## GetIdentitySchema
816816

817-
> map[string]interface{} GetJsonSchema(ctx, id).Execute()
817+
> map[string]interface{} GetIdentitySchema(ctx, id).Execute()
818818
819819

820820

@@ -837,13 +837,13 @@ func main() {
837837

838838
configuration := openapiclient.NewConfiguration()
839839
apiClient := openapiclient.NewAPIClient(configuration)
840-
resp, r, err := apiClient.V0alpha2Api.GetJsonSchema(context.Background(), id).Execute()
840+
resp, r, err := apiClient.V0alpha2Api.GetIdentitySchema(context.Background(), id).Execute()
841841
if err != nil {
842-
fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.GetJsonSchema``: %v\n", err)
842+
fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.GetIdentitySchema``: %v\n", err)
843843
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
844844
}
845-
// response from `GetJsonSchema`: map[string]interface{}
846-
fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.GetJsonSchema`: %v\n", resp)
845+
// response from `GetIdentitySchema`: map[string]interface{}
846+
fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.GetIdentitySchema`: %v\n", resp)
847847
}
848848
```
849849

@@ -857,7 +857,7 @@ Name | Type | Description | Notes
857857

858858
### Other Parameters
859859

860-
Other parameters are passed through a pointer to a apiGetJsonSchemaRequest struct via the builder pattern
860+
Other parameters are passed through a pointer to a apiGetIdentitySchemaRequest struct via the builder pattern
861861

862862

863863
Name | Type | Description | Notes
@@ -2006,7 +2006,7 @@ No authorization required
20062006

20072007
## ListIdentitySchemas
20082008

2009-
> []IdentitySchema ListIdentitySchemas(ctx).PerPage(perPage).Page(page).Execute()
2009+
> []IdentitySchemaContainer ListIdentitySchemas(ctx).PerPage(perPage).Page(page).Execute()
20102010
20112011

20122012

@@ -2035,7 +2035,7 @@ func main() {
20352035
fmt.Fprintf(os.Stderr, "Error when calling `V0alpha2Api.ListIdentitySchemas``: %v\n", err)
20362036
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
20372037
}
2038-
// response from `ListIdentitySchemas`: []IdentitySchema
2038+
// response from `ListIdentitySchemas`: []IdentitySchemaContainer
20392039
fmt.Fprintf(os.Stdout, "Response from `V0alpha2Api.ListIdentitySchemas`: %v\n", resp)
20402040
}
20412041
```
@@ -2056,7 +2056,7 @@ Name | Type | Description | Notes
20562056

20572057
### Return type
20582058

2059-
[**[]IdentitySchema**](IdentitySchema.md)
2059+
[**[]IdentitySchemaContainer**](IdentitySchemaContainer.md)
20602060

20612061
### Authorization
20622062

0 commit comments

Comments
 (0)