Skip to content

Commit

Permalink
Correct certificate key api (#37)
Browse files Browse the repository at this point in the history
* corrections to API and model

* Add missing value to `EnumCertificateKeyStatus`

* changelog
  • Loading branch information
patrickcping authored Sep 1, 2022
1 parent a43ed23 commit c934769
Show file tree
Hide file tree
Showing 16 changed files with 180 additions and 56 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* **Breaking change** Changed required attributes on the `Certificate` model [#35](https://github.com/patrickcping/pingone-go-sdk-v2/pull/35)
* **Enhancement** Support for Kerberos Gateway [#32](https://github.com/patrickcping/pingone-go-sdk-v2/pull/32)
* **Enhancement** `EnumCertificateKeyUsageType` includes missing enum values [#33](https://github.com/patrickcping/pingone-go-sdk-v2/pull/33)
* **Enhancement** `EnumCertificateKeyStatus` includes missing enum values [#37](https://github.com/patrickcping/pingone-go-sdk-v2/pull/37)
* **Enhancement** `EnumCertificateKeySignagureAlgorithm` includes missing enum values [#33](https://github.com/patrickcping/pingone-go-sdk-v2/pull/33), [#36](https://github.com/patrickcping/pingone-go-sdk-v2/pull/36)
* **Enhancement** Better define the Certificate Key update model [#34](https://github.com/patrickcping/pingone-go-sdk-v2/pull/34)

Expand Down
3 changes: 3 additions & 0 deletions management/.openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ api_password_policies.go
model_sign_on_policy_action.go
docs/PasswordPolicyMinCharacters.md
model_identity_provider.go
model_certificate.go
api_certificate_management.go
docs/Certificate.md
GNUmakefile
.version
3 changes: 0 additions & 3 deletions management/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ api_bill_of_materials_bom.go
api_branding_settings.go
api_branding_themes.go
api_capabilities.go
api_certificate_management.go
api_custom_domains.go
api_device_authentication_policy.go
api_enable_users.go
Expand Down Expand Up @@ -125,7 +124,6 @@ docs/BillOfMaterialsProductsInnerDeployment.md
docs/BrandingSettingsApi.md
docs/BrandingThemesApi.md
docs/CapabilitiesApi.md
docs/Certificate.md
docs/CertificateKeyUpdate.md
docs/CertificateManagementApi.md
docs/CreateApplication201Response.md
Expand Down Expand Up @@ -427,7 +425,6 @@ model_bill_of_materials_products_inner.go
model_bill_of_materials_products_inner_bookmarks_inner.go
model_bill_of_materials_products_inner_console.go
model_bill_of_materials_products_inner_deployment.go
model_certificate.go
model_certificate_key_update.go
model_create_application_201_response.go
model_create_application_request.go
Expand Down
1 change: 1 addition & 0 deletions management/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* **Breaking change** Changed required attributes on the `Certificate` model [#35](https://github.com/patrickcping/pingone-go-sdk-v2/pull/35)
* **Enhancement** Support for Kerberos Gateway [#32](https://github.com/patrickcping/pingone-go-sdk-v2/pull/32)
* **Enhancement** `EnumCertificateKeyUsageType` includes missing enum values [#33](https://github.com/patrickcping/pingone-go-sdk-v2/pull/33)
* **Enhancement** `EnumCertificateKeyStatus` includes missing enum values [#37](https://github.com/patrickcping/pingone-go-sdk-v2/pull/37)
* **Enhancement** `EnumCertificateKeySignagureAlgorithm` includes missing enum values [#33](https://github.com/patrickcping/pingone-go-sdk-v2/pull/33), [#36](https://github.com/patrickcping/pingone-go-sdk-v2/pull/36)
* **Enhancement** Better define the Certificate Key update model [#34](https://github.com/patrickcping/pingone-go-sdk-v2/pull/34)

Expand Down
28 changes: 17 additions & 11 deletions management/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5039,6 +5039,9 @@ paths:
description: Uncaught error occurred. Platform outage
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/Certificate'
application/x-x509-ca-cert:
schema:
format: byte
Expand All @@ -5047,9 +5050,6 @@ paths:
schema:
format: binary
type: string
application/json:
schema:
$ref: '#/components/schemas/Certificate'
description: Successful response
summary: GET Key
tags:
Expand Down Expand Up @@ -21142,23 +21142,24 @@ components:
EnumCertificateKeySignagureAlgorithm:
description: "Specifies the signature algorithm of the key. For RSA keys, options\
\ are `SHA224withRSA`, `SHA256withRSA`, `SHA384withRSA` and `SHA512withRSA`.\
\ For elliptical curve (EC) keys, options are `SHA224with_ECDSA`, `SHA256with_ECDSA`,\
\ `SHA384with_ECDSA`, and `SHA512with_ECDSA`"
\ For elliptical curve (EC) keys, options are `SHA224withECDSA`, `SHA256withECDSA`,\
\ `SHA384withECDSA`, and `SHA512withECDSA`"
enum:
- SHA224withRSA
- SHA256withRSA
- SHA384withRSA
- SHA512withRSA
- SHA224with_ECDSA
- SHA256with_ECDSA
- SHA384with_ECDSA
- SHA512with_ECDSA
- SHA224withECDSA
- SHA256withECDSA
- SHA384withECDSA
- SHA512withECDSA
type: string
EnumCertificateKeyStatus:
description: "Specifies the status of the key. Options are `VALID`, `EXPIRED`,\
\ `NOT_YET_VALID`, and `REVOKED`."
description: "Specifies the status of the key. Options are `VALID`, `EXPIRING`,\
\ `EXPIRED`, `NOT_YET_VALID`, and `REVOKED`."
enum:
- VALID
- EXPIRING
- EXPIRED
- NOT_YET_VALID
- REVOKED
Expand Down Expand Up @@ -22014,6 +22015,7 @@ components:
$ref: '#/components/schemas/ObjectOrganization'
serialNumber:
description: Specifies the serial number of the key or certificate.
format: int64
type: integer
signatureAlgorithm:
$ref: '#/components/schemas/EnumCertificateKeySignagureAlgorithm'
Expand Down Expand Up @@ -22045,6 +22047,7 @@ components:
CertificateKeyUpdate:
example:
default: true
issuerDN: issuerDN
usageType: null
properties:
default:
Expand All @@ -22053,6 +22056,9 @@ components:
type: boolean
usageType:
$ref: '#/components/schemas/EnumCertificateKeyUsageType'
issuerDN:
description: Specifies the distinguished name of the certificate issuer.
type: string
required:
- default
- usageType
Expand Down
60 changes: 52 additions & 8 deletions management/api_certificate_management.go

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

8 changes: 4 additions & 4 deletions management/docs/Certificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Name | Type | Description | Notes
**KeyLength** | **int32** | Specifies the key length. For RSA keys, options are 2048, 3072, and 7680. For elliptical curve (EC) keys, options are 224, 256, and 384. |
**Name** | **string** | Specifies the resource name. |
**Organization** | Pointer to [**ObjectOrganization**](ObjectOrganization.md) | | [optional]
**SerialNumber** | Pointer to **int32** | Specifies the serial number of the key or certificate. | [optional]
**SerialNumber** | Pointer to **big.Int** | Specifies the serial number of the key or certificate. | [optional]
**SignatureAlgorithm** | [**EnumCertificateKeySignagureAlgorithm**](EnumCertificateKeySignagureAlgorithm.md) | |
**StartsAt** | Pointer to **time.Time** | The time the validity period starts. | [optional] [readonly]
**Status** | Pointer to [**EnumCertificateKeyStatus**](EnumCertificateKeyStatus.md) | | [optional]
Expand Down Expand Up @@ -278,20 +278,20 @@ HasOrganization returns a boolean if a field has been set.

### GetSerialNumber

`func (o *Certificate) GetSerialNumber() int32`
`func (o *Certificate) GetSerialNumber() big.Int`

GetSerialNumber returns the SerialNumber field if non-nil, zero value otherwise.

### GetSerialNumberOk

`func (o *Certificate) GetSerialNumberOk() (*int32, bool)`
`func (o *Certificate) GetSerialNumberOk() (*big.Int, bool)`

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

### SetSerialNumber

`func (o *Certificate) SetSerialNumber(v int32)`
`func (o *Certificate) SetSerialNumber(v big.Int)`

SetSerialNumber sets SerialNumber field to given value.

Expand Down
26 changes: 26 additions & 0 deletions management/docs/CertificateKeyUpdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Default** | **bool** | Specifies whether this is the default key for the specified environment. |
**UsageType** | [**EnumCertificateKeyUsageType**](EnumCertificateKeyUsageType.md) | |
**IssuerDN** | Pointer to **string** | Specifies the distinguished name of the certificate issuer. | [optional]

## Methods

Expand Down Expand Up @@ -66,6 +67,31 @@ and a boolean to check if the value has been set.
SetUsageType sets UsageType field to given value.


### GetIssuerDN

`func (o *CertificateKeyUpdate) GetIssuerDN() string`

GetIssuerDN returns the IssuerDN field if non-nil, zero value otherwise.

### GetIssuerDNOk

`func (o *CertificateKeyUpdate) GetIssuerDNOk() (*string, bool)`

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

### SetIssuerDN

`func (o *CertificateKeyUpdate) SetIssuerDN(v string)`

SetIssuerDN sets IssuerDN field to given value.

### HasIssuerDN

`func (o *CertificateKeyUpdate) HasIssuerDN() bool`

HasIssuerDN returns a boolean if a field has been set.


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

Expand Down
6 changes: 3 additions & 3 deletions management/docs/CertificateManagementApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ Name | Type | Description | Notes

## GetKey

> string GetKey(ctx, environmentID, keyID).Accept(accept).Execute()
> Certificate GetKey(ctx, environmentID, keyID).Accept(accept).Execute()
GET Key

Expand Down Expand Up @@ -621,7 +621,7 @@ func main() {
fmt.Fprintf(os.Stderr, "Error when calling `CertificateManagementApi.GetKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetKey`: string
// response from `GetKey`: Certificate
fmt.Fprintf(os.Stdout, "Response from `CertificateManagementApi.GetKey`: %v\n", resp)
}
```
Expand All @@ -648,7 +648,7 @@ Name | Type | Description | Notes

### Return type

**string**
[**Certificate**](Certificate.md)

### Authorization

Expand Down
8 changes: 4 additions & 4 deletions management/docs/EnumCertificateKeySignagureAlgorithm.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

* `SHA512WITH_RSA` (value: `"SHA512withRSA"`)

* `SHA224WITH_ECDSA` (value: `"SHA224with_ECDSA"`)
* `SHA224WITH_ECDSA` (value: `"SHA224withECDSA"`)

* `SHA256WITH_ECDSA` (value: `"SHA256with_ECDSA"`)
* `SHA256WITH_ECDSA` (value: `"SHA256withECDSA"`)

* `SHA384WITH_ECDSA` (value: `"SHA384with_ECDSA"`)
* `SHA384WITH_ECDSA` (value: `"SHA384withECDSA"`)

* `SHA512WITH_ECDSA` (value: `"SHA512with_ECDSA"`)
* `SHA512WITH_ECDSA` (value: `"SHA512withECDSA"`)


[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 2 additions & 0 deletions management/docs/EnumCertificateKeyStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

* `VALID` (value: `"VALID"`)

* `EXPIRING` (value: `"EXPIRING"`)

* `EXPIRED` (value: `"EXPIRED"`)

* `NOT_YET_VALID` (value: `"NOT_YET_VALID"`)
Expand Down
Loading

0 comments on commit c934769

Please sign in to comment.