Skip to content

Commit

Permalink
Support the issuance of multiple verifiable credentials based on a di…
Browse files Browse the repository at this point in the history
…rectory attribute. (#275)

* SDK update to support the issuance of multiple verifiable credentials based on a directory attribute.

* Changelog update.

* uplift `credentials` version + changelog

---------

Co-authored-by: Patrick Cowland <[email protected]>
  • Loading branch information
mjspi and patrickcping authored Oct 31, 2023
1 parent 54fb251 commit 64903ae
Show file tree
Hide file tree
Showing 17 changed files with 381 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release (Unreleased)

* `github.com/patrickcping/pingone-go-sdk-v2/credentials` : [v0.5.0](./credentials/CHANGELOG.md)
* **Enhancement** Added the `Default` property to the `CredentialTypeMetaDataFieldsInner` object model. [#275](https://github.com/patrickcping/pingone-go-sdk-v2/pull/275)
* **Enhancement** Added `Multiple` object attribute to the `CredentialType` object model. [#275](https://github.com/patrickcping/pingone-go-sdk-v2/pull/275)
* `github.com/patrickcping/pingone-go-sdk-v2/management` : [v0.31.0](./management/CHANGELOG.md)
* **Enhancement** Added `DisplayName`, `SourceId` and `SourceType` object attributes to the `Group` object model. [#264](https://github.com/patrickcping/pingone-go-sdk-v2/pull/264)
* **Enhancement** Added `TlsClientAuthKeyPair` object attributes to the `Subscription` object model. [#265](https://github.com/patrickcping/pingone-go-sdk-v2/pull/265)
Expand Down
2 changes: 2 additions & 0 deletions credentials/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ docs/CredentialIssuersApi.md
docs/CredentialType.md
docs/CredentialTypeMetaData.md
docs/CredentialTypeMetaDataFieldsInner.md
docs/CredentialTypeMultiple.md
docs/CredentialTypeOnDelete.md
docs/CredentialTypesApi.md
docs/DigitalWalletApplication.md
Expand Down Expand Up @@ -111,6 +112,7 @@ model_credential_issuer_profile_application_instance.go
model_credential_type.go
model_credential_type_meta_data.go
model_credential_type_meta_data_fields_inner.go
model_credential_type_multiple.go
model_credential_type_on_delete.go
model_digital_wallet_application.go
model_entity_array.go
Expand Down
2 changes: 1 addition & 1 deletion credentials/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.1
0.5.0
5 changes: 5 additions & 0 deletions credentials/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v0.5.0 (Unreleased)

* **Enhancement** Added the `Default` property to the `CredentialTypeMetaDataFieldsInner` object model. [#275](https://github.com/patrickcping/pingone-go-sdk-v2/pull/275)
* **Enhancement** Added `Multiple` object attribute to the `CredentialType` object model. [#275](https://github.com/patrickcping/pingone-go-sdk-v2/pull/275)

# v0.4.1 (2023-10-16)

* **Note** Unskip read only attributes when converting API models to maps. [#255](https://github.com/patrickcping/pingone-go-sdk-v2/pull/255)
Expand Down
3 changes: 2 additions & 1 deletion credentials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The PingOne Platform API covering the PingOne Credentials service
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 2023-06-29
- Package version: 0.4.1
- Package version: 0.5.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen

## Installation
Expand Down Expand Up @@ -147,6 +147,7 @@ Class | Method | HTTP request | Description
- [CredentialType](docs/CredentialType.md)
- [CredentialTypeMetaData](docs/CredentialTypeMetaData.md)
- [CredentialTypeMetaDataFieldsInner](docs/CredentialTypeMetaDataFieldsInner.md)
- [CredentialTypeMultiple](docs/CredentialTypeMultiple.md)
- [CredentialTypeOnDelete](docs/CredentialTypeOnDelete.md)
- [DigitalWalletApplication](docs/DigitalWalletApplication.md)
- [EntityArray](docs/EntityArray.md)
Expand Down
36 changes: 32 additions & 4 deletions credentials/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2420,14 +2420,16 @@ components:
bgOpacityPercent: 0
cardColor: cardColor
fields:
- attribute: attribute
- default: default
attribute: attribute
id: id
isVisible: true
fileSupport: null
title: title
type: null
value: value
- attribute: attribute
- default: default
attribute: attribute
id: id
isVisible: true
fileSupport: null
Expand Down Expand Up @@ -2488,14 +2490,16 @@ components:
bgOpacityPercent: 0
cardColor: cardColor
fields:
- attribute: attribute
- default: default
attribute: attribute
id: id
isVisible: true
fileSupport: null
title: title
type: null
value: value
- attribute: attribute
- default: default
attribute: attribute
id: id
isVisible: true
fileSupport: null
Expand All @@ -2511,6 +2515,8 @@ components:
href: https://openapi-generator.tech
issuerName: issuerName
cardType: cardType
multiple:
expression: expression
description: description
title: title
issuer:
Expand Down Expand Up @@ -2562,6 +2568,8 @@ components:
type: string
metadata:
$ref: '#/components/schemas/CredentialTypeMetaData'
multiple:
$ref: '#/components/schemas/CredentialType_multiple'
onDelete:
$ref: '#/components/schemas/CredentialType_onDelete'
title:
Expand Down Expand Up @@ -3554,6 +3562,7 @@ components:
type: object
CredentialTypeMetaData_fields_inner:
example:
default: default
attribute: attribute
id: id
isVisible: true
Expand All @@ -3566,6 +3575,10 @@ components:
description: A string that specifies the name of the PingOne Directory attribute
if field.type is Directory Attribute.
type: string
default:
description: Assigns a default field value if a PingOne Expression Language
(PEL) expression in the fields.attribute evaluates to no value.
type: string
id:
description: A string that specifies the identifier of the field.
type: string
Expand All @@ -3591,6 +3604,21 @@ components:
- title
- type
type: object
CredentialType_multiple:
description: An object containing directives that enable the issuance of multiple
credentials to a user based on a directory attribute.
example:
expression: expression
properties:
expression:
description: "A PingOne Expression Language (PEL) expression evaluated by\
\ the P1 Credentials service on issuance.If an array, calculates the array\
\ length for the count. Populates the limit to a variable, __ITERATOR__,\
\ available to PEL expressions in metadata.fields.attribute."
type: string
required:
- expression
type: object
CredentialType_onDelete:
example:
revokeIssuedCredentials: true
Expand Down
2 changes: 1 addition & 1 deletion credentials/configuration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions credentials/docs/CredentialType.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Name | Type | Description | Notes
**Issuer** | Pointer to [**ObjectIssuer**](ObjectIssuer.md) | | [optional]
**IssuerName** | Pointer to **string** | v issuer name associated with the card, can differ from title. | [optional]
**Metadata** | [**CredentialTypeMetaData**](CredentialTypeMetaData.md) | |
**Multiple** | Pointer to [**CredentialTypeMultiple**](CredentialTypeMultiple.md) | | [optional]
**OnDelete** | Pointer to [**CredentialTypeOnDelete**](CredentialTypeOnDelete.md) | | [optional]
**Title** | **string** | A string that specifies the title of the credential. Verification sites are expected to be able to request the issued credential from the compatible wallet app using the title. |
**UpdatedAt** | Pointer to **time.Time** | A string that specifies the date and time the credential type was last updated; can be null. | [optional] [readonly]
Expand Down Expand Up @@ -303,6 +304,31 @@ and a boolean to check if the value has been set.
SetMetadata sets Metadata field to given value.


### GetMultiple

`func (o *CredentialType) GetMultiple() CredentialTypeMultiple`

GetMultiple returns the Multiple field if non-nil, zero value otherwise.

### GetMultipleOk

`func (o *CredentialType) GetMultipleOk() (*CredentialTypeMultiple, bool)`

GetMultipleOk returns a tuple with the Multiple field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetMultiple

`func (o *CredentialType) SetMultiple(v CredentialTypeMultiple)`

SetMultiple sets Multiple field to given value.

### HasMultiple

`func (o *CredentialType) HasMultiple() bool`

HasMultiple returns a boolean if a field has been set.

### GetOnDelete

`func (o *CredentialType) GetOnDelete() CredentialTypeOnDelete`
Expand Down
26 changes: 26 additions & 0 deletions credentials/docs/CredentialTypeMetaDataFieldsInner.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Attribute** | Pointer to **string** | A string that specifies the name of the PingOne Directory attribute if field.type is Directory Attribute. | [optional]
**Default** | Pointer to **string** | Assigns a default field value if a PingOne Expression Language (PEL) expression in the fields.attribute evaluates to no value. | [optional]
**Id** | **string** | A string that specifies the identifier of the field. |
**FileSupport** | Pointer to [**EnumCredentialTypeMetaDataFieldsFileSupport**](EnumCredentialTypeMetaDataFieldsFileSupport.md) | | [optional]
**IsVisible** | **bool** | A boolean value that specifies whether the field should be visible to viewers of the credential. |
Expand Down Expand Up @@ -56,6 +57,31 @@ SetAttribute sets Attribute field to given value.

HasAttribute returns a boolean if a field has been set.

### GetDefault

`func (o *CredentialTypeMetaDataFieldsInner) GetDefault() string`

GetDefault returns the Default field if non-nil, zero value otherwise.

### GetDefaultOk

`func (o *CredentialTypeMetaDataFieldsInner) GetDefaultOk() (*string, bool)`

GetDefaultOk returns a tuple with the Default field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetDefault

`func (o *CredentialTypeMetaDataFieldsInner) SetDefault(v string)`

SetDefault sets Default field to given value.

### HasDefault

`func (o *CredentialTypeMetaDataFieldsInner) HasDefault() bool`

HasDefault returns a boolean if a field has been set.

### GetId

`func (o *CredentialTypeMetaDataFieldsInner) GetId() string`
Expand Down
51 changes: 51 additions & 0 deletions credentials/docs/CredentialTypeMultiple.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# CredentialTypeMultiple

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Expression** | **string** | A PingOne Expression Language (PEL) expression evaluated by the P1 Credentials service on issuance.If an array, calculates the array length for the count. Populates the limit to a variable, __ITERATOR__, available to PEL expressions in metadata.fields.attribute. |

## Methods

### NewCredentialTypeMultiple

`func NewCredentialTypeMultiple(expression string, ) *CredentialTypeMultiple`

NewCredentialTypeMultiple instantiates a new CredentialTypeMultiple object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed

### NewCredentialTypeMultipleWithDefaults

`func NewCredentialTypeMultipleWithDefaults() *CredentialTypeMultiple`

NewCredentialTypeMultipleWithDefaults instantiates a new CredentialTypeMultiple object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set

### GetExpression

`func (o *CredentialTypeMultiple) GetExpression() string`

GetExpression returns the Expression field if non-nil, zero value otherwise.

### GetExpressionOk

`func (o *CredentialTypeMultiple) GetExpressionOk() (*string, bool)`

GetExpressionOk returns a tuple with the Expression field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetExpression

`func (o *CredentialTypeMultiple) SetExpression(v string)`

SetExpression sets Expression field to given value.



[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


26 changes: 26 additions & 0 deletions credentials/docs/EntityArrayEmbeddedItemsInner.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Name | Type | Description | Notes
**Issuer** | Pointer to [**ObjectIssuer**](ObjectIssuer.md) | | [optional]
**IssuerName** | Pointer to **string** | v issuer name associated with the card, can differ from title. | [optional]
**Metadata** | [**CredentialTypeMetaData**](CredentialTypeMetaData.md) | |
**Multiple** | Pointer to [**CredentialTypeMultiple**](CredentialTypeMultiple.md) | | [optional]
**OnDelete** | Pointer to [**CredentialTypeOnDelete**](CredentialTypeOnDelete.md) | | [optional]
**Title** | **string** | A string that specifies the title of the credential. Verification sites are expected to be able to request the issued credential from the compatible wallet app using the title. |
**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly]
Expand Down Expand Up @@ -309,6 +310,31 @@ and a boolean to check if the value has been set.
SetMetadata sets Metadata field to given value.


### GetMultiple

`func (o *EntityArrayEmbeddedItemsInner) GetMultiple() CredentialTypeMultiple`

GetMultiple returns the Multiple field if non-nil, zero value otherwise.

### GetMultipleOk

`func (o *EntityArrayEmbeddedItemsInner) GetMultipleOk() (*CredentialTypeMultiple, bool)`

GetMultipleOk returns a tuple with the Multiple field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetMultiple

`func (o *EntityArrayEmbeddedItemsInner) SetMultiple(v CredentialTypeMultiple)`

SetMultiple sets Multiple field to given value.

### HasMultiple

`func (o *EntityArrayEmbeddedItemsInner) HasMultiple() bool`

HasMultiple returns a boolean if a field has been set.

### GetOnDelete

`func (o *EntityArrayEmbeddedItemsInner) GetOnDelete() CredentialTypeOnDelete`
Expand Down
12 changes: 12 additions & 0 deletions credentials/generate/pingone-credentials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ components:
attribute:
type: string
description: A string that specifies the name of the PingOne Directory attribute if field.type is Directory Attribute.
default:
type: string
description: Assigns a default field value if a PingOne Expression Language (PEL) expression in the fields.attribute evaluates to no value.
id:
type: string
description: A string that specifies the identifier of the field.
Expand Down Expand Up @@ -230,6 +233,15 @@ components:
description: v issuer name associated with the card, can differ from title.
metadata:
$ref: '#/components/schemas/CredentialTypeMetaData'
multiple:
type: object
description: An object containing directives that enable the issuance of multiple credentials to a user based on a directory attribute.
properties:
expression:
type: string
description: A PingOne Expression Language (PEL) expression evaluated by the P1 Credentials service on issuance.If an array, calculates the array length for the count. Populates the limit to a variable, __ITERATOR__, available to PEL expressions in metadata.fields.attribute.
required:
- expression
onDelete:
type: object
properties:
Expand Down
2 changes: 1 addition & 1 deletion credentials/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
)

require (
Expand Down
4 changes: 2 additions & 2 deletions credentials/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
Loading

0 comments on commit 64903ae

Please sign in to comment.