Skip to content

Commit

Permalink
Add HATEOAS links and paging to data models (#227)
Browse files Browse the repository at this point in the history
* Add cursor support for APIs

* Add HATEOS to generated management APIs

* management version and changelog

* Add HATEOAS to authorize APIs

* Add HATEOAS to credentials APIs

* Add HATEOAS to mfa APIs

* Add HATEOAS to risk APIs

* Add HATEOAS to verify APIs
  • Loading branch information
patrickcping authored Jul 24, 2023
1 parent 852977e commit 4fa85ee
Show file tree
Hide file tree
Showing 350 changed files with 12,771 additions and 501 deletions.
6 changes: 6 additions & 0 deletions authorize/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ docs/DecisionEndpointRecentDecisions.md
docs/EntityArray.md
docs/EntityArrayEmbedded.md
docs/EnumAPIServerPatternType.md
docs/LinksHATEOAS.md
docs/LinksHATEOASNext.md
docs/LinksHATEOASSelf.md
docs/ObjectApplication.md
docs/ObjectEnvironment.md
docs/ObjectOrganization.md
Expand All @@ -32,6 +35,9 @@ model_decision_endpoint_recent_decisions.go
model_entity_array.go
model_entity_array__embedded.go
model_enum_api_server_pattern_type.go
model_links_hateoas.go
model_links_hateoas_next.go
model_links_hateoas_self.go
model_object_application.go
model_object_environment.go
model_object_organization.go
Expand Down
2 changes: 1 addition & 1 deletion authorize/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.1
0.3.0
4 changes: 4 additions & 0 deletions authorize/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v0.3.0 (Unreleased)

* **Enhancement** Implement HATEOAS links for API response objects. [#227](https://github.com/patrickcping/pingone-go-sdk-v2/pull/227)

# v0.2.1 (2023-07-12)

* **Note** Code optimisation for API response processing. [#216](https://github.com/patrickcping/pingone-go-sdk-v2/pull/216)
Expand Down
5 changes: 4 additions & 1 deletion authorize/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 Authorize 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.2.1
- Package version: 0.3.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen

## Installation
Expand Down Expand Up @@ -100,6 +100,9 @@ Class | Method | HTTP request | Description
- [EntityArray](docs/EntityArray.md)
- [EntityArrayEmbedded](docs/EntityArrayEmbedded.md)
- [EnumAPIServerPatternType](docs/EnumAPIServerPatternType.md)
- [LinksHATEOAS](docs/LinksHATEOAS.md)
- [LinksHATEOASNext](docs/LinksHATEOASNext.md)
- [LinksHATEOASSelf](docs/LinksHATEOASSelf.md)
- [ObjectApplication](docs/ObjectApplication.md)
- [ObjectEnvironment](docs/ObjectEnvironment.md)
- [ObjectOrganization](docs/ObjectOrganization.md)
Expand Down
101 changes: 101 additions & 0 deletions authorize/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -722,18 +722,43 @@ components:
$ref: '#/components/schemas/P1Error'
description: Uncaught error occurred. Platform outage
schemas:
LinksHATEOAS:
additionalProperties: true
example:
next:
href: https://openapi-generator.tech
self:
href: https://openapi-generator.tech
properties:
self:
$ref: '#/components/schemas/LinksHATEOAS_self'
next:
$ref: '#/components/schemas/LinksHATEOAS_next'
readOnly: true
type: object
LinksHATEOASHref:
description: The URI of the resource.
format: uri
type: string
APIServer:
example:
baseURLs:
- baseURLs
- baseURLs
operations: "{}"
_links:
next:
href: https://openapi-generator.tech
self:
href: https://openapi-generator.tech
authorizationServer:
resource:
id: id
name: name
id: id
properties:
_links:
$ref: '#/components/schemas/LinksHATEOAS'
authorizationServer:
$ref: '#/components/schemas/APIServer_authorizationServer'
baseURLs:
Expand Down Expand Up @@ -789,6 +814,11 @@ components:
alternateId: alternateId
provenance: provenance
policyId: policyId
_links:
next:
href: https://openapi-generator.tech
self:
href: https://openapi-generator.tech
owned: true
name: name
authorizationVersion:
Expand All @@ -805,6 +835,8 @@ components:
title: title
type: type
properties:
_links:
$ref: '#/components/schemas/LinksHATEOAS'
alternateId:
description: "A string that specifies alternative unique identifier for\
\ the endpoint, which provides a method for locating the resource by a\
Expand Down Expand Up @@ -856,11 +888,21 @@ components:
EntityArray:
example:
size: 6.027456183070403
_links:
next:
href: https://openapi-generator.tech
self:
href: https://openapi-generator.tech
_embedded:
decisionEndpoints:
- alternateId: alternateId
provenance: provenance
policyId: policyId
_links:
next:
href: https://openapi-generator.tech
self:
href: https://openapi-generator.tech
owned: true
name: name
authorizationVersion:
Expand All @@ -879,6 +921,11 @@ components:
- alternateId: alternateId
provenance: provenance
policyId: policyId
_links:
next:
href: https://openapi-generator.tech
self:
href: https://openapi-generator.tech
owned: true
name: name
authorizationVersion:
Expand All @@ -899,6 +946,11 @@ components:
- baseURLs
- baseURLs
operations: "{}"
_links:
next:
href: https://openapi-generator.tech
self:
href: https://openapi-generator.tech
authorizationServer:
resource:
id: id
Expand All @@ -908,13 +960,20 @@ components:
- baseURLs
- baseURLs
operations: "{}"
_links:
next:
href: https://openapi-generator.tech
self:
href: https://openapi-generator.tech
authorizationServer:
resource:
id: id
name: name
id: id
count: 0.8008281904610115
properties:
_links:
$ref: '#/components/schemas/LinksHATEOAS'
_embedded:
$ref: '#/components/schemas/EntityArray__embedded'
count:
Expand Down Expand Up @@ -983,6 +1042,28 @@ components:
$ref: '#/components/schemas/P1Error_details_inner'
type: array
type: object
LinksHATEOAS_self:
description: An object that describes the current resource.
example:
href: https://openapi-generator.tech
properties:
href:
description: The URI of the resource.
format: uri
type: string
type: object
LinksHATEOAS_next:
description: An object that describes the next page of results. This property
is present only if there is a next page of results and the `limit` parameter
is used.
example:
href: https://openapi-generator.tech
properties:
href:
description: The URI of the resource.
format: uri
type: string
type: object
APIServer_authorizationServer_resource:
description: The resource defines the characteristics of the OAuth 2.0 access
tokens used to get access to the APIs on the API server such as the audience
Expand Down Expand Up @@ -1061,6 +1142,11 @@ components:
- alternateId: alternateId
provenance: provenance
policyId: policyId
_links:
next:
href: https://openapi-generator.tech
self:
href: https://openapi-generator.tech
owned: true
name: name
authorizationVersion:
Expand All @@ -1079,6 +1165,11 @@ components:
- alternateId: alternateId
provenance: provenance
policyId: policyId
_links:
next:
href: https://openapi-generator.tech
self:
href: https://openapi-generator.tech
owned: true
name: name
authorizationVersion:
Expand All @@ -1099,6 +1190,11 @@ components:
- baseURLs
- baseURLs
operations: "{}"
_links:
next:
href: https://openapi-generator.tech
self:
href: https://openapi-generator.tech
authorizationServer:
resource:
id: id
Expand All @@ -1108,6 +1204,11 @@ components:
- baseURLs
- baseURLs
operations: "{}"
_links:
next:
href: https://openapi-generator.tech
self:
href: https://openapi-generator.tech
authorizationServer:
resource:
id: id
Expand Down
2 changes: 1 addition & 1 deletion authorize/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 authorize/docs/APIServer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Links** | Pointer to [**LinksHATEOAS**](LinksHATEOAS.md) | | [optional]
**AuthorizationServer** | [**APIServerAuthorizationServer**](APIServerAuthorizationServer.md) | |
**BaseURLs** | **[]string** | An array of string that specifies the possible base URLs that an end-user will use to access the APIs hosted on the customer's API server. Multiple base URLs may be specified to support cases where the same API may be available from multiple URLs (for example, from a user-friendly domain URL and an internal domain URL). Base URLs must be valid absolute URLs with the https or http scheme. If the path component is non-empty, it must not end in a trailing slash. The path must not contain empty backslash, dot, or double-dot segments. It must not have a query or fragment present, and the host portion of the authority must be a DNS hostname or valid IP (IPv4 or IPv6). The length must be less than or equal to 256 characters. |
**Id** | Pointer to **string** | A string that specifies the resource's unique identifier. | [optional] [readonly]
Expand All @@ -29,6 +30,31 @@ NewAPIServerWithDefaults instantiates a new APIServer 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

### GetLinks

`func (o *APIServer) GetLinks() LinksHATEOAS`

GetLinks returns the Links field if non-nil, zero value otherwise.

### GetLinksOk

`func (o *APIServer) GetLinksOk() (*LinksHATEOAS, bool)`

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

### SetLinks

`func (o *APIServer) SetLinks(v LinksHATEOAS)`

SetLinks sets Links field to given value.

### HasLinks

`func (o *APIServer) HasLinks() bool`

HasLinks returns a boolean if a field has been set.

### GetAuthorizationServer

`func (o *APIServer) GetAuthorizationServer() APIServerAuthorizationServer`
Expand Down
26 changes: 26 additions & 0 deletions authorize/docs/DecisionEndpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Links** | Pointer to [**LinksHATEOAS**](LinksHATEOAS.md) | | [optional]
**AlternateId** | Pointer to **string** | A string that specifies alternative unique identifier for the endpoint, which provides a method for locating the resource by a known, fixed identifier. | [optional]
**AuthorizationVersion** | Pointer to [**DecisionEndpointAuthorizationVersion**](DecisionEndpointAuthorizationVersion.md) | | [optional]
**Description** | **string** | A string that specifies the description of the policy decision resource. |
Expand Down Expand Up @@ -35,6 +36,31 @@ NewDecisionEndpointWithDefaults instantiates a new DecisionEndpoint 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

### GetLinks

`func (o *DecisionEndpoint) GetLinks() LinksHATEOAS`

GetLinks returns the Links field if non-nil, zero value otherwise.

### GetLinksOk

`func (o *DecisionEndpoint) GetLinksOk() (*LinksHATEOAS, bool)`

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

### SetLinks

`func (o *DecisionEndpoint) SetLinks(v LinksHATEOAS)`

SetLinks sets Links field to given value.

### HasLinks

`func (o *DecisionEndpoint) HasLinks() bool`

HasLinks returns a boolean if a field has been set.

### GetAlternateId

`func (o *DecisionEndpoint) GetAlternateId() string`
Expand Down
26 changes: 26 additions & 0 deletions authorize/docs/EntityArray.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Links** | Pointer to [**LinksHATEOAS**](LinksHATEOAS.md) | | [optional]
**Embedded** | Pointer to [**EntityArrayEmbedded**](EntityArrayEmbedded.md) | | [optional]
**Count** | Pointer to **float32** | | [optional]
**Size** | Pointer to **float32** | | [optional]
Expand All @@ -27,6 +28,31 @@ NewEntityArrayWithDefaults instantiates a new EntityArray 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

### GetLinks

`func (o *EntityArray) GetLinks() LinksHATEOAS`

GetLinks returns the Links field if non-nil, zero value otherwise.

### GetLinksOk

`func (o *EntityArray) GetLinksOk() (*LinksHATEOAS, bool)`

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

### SetLinks

`func (o *EntityArray) SetLinks(v LinksHATEOAS)`

SetLinks sets Links field to given value.

### HasLinks

`func (o *EntityArray) HasLinks() bool`

HasLinks returns a boolean if a field has been set.

### GetEmbedded

`func (o *EntityArray) GetEmbedded() EntityArrayEmbedded`
Expand Down
Loading

0 comments on commit 4fa85ee

Please sign in to comment.