From cb8181df35ccf52dbccb51404d87d56f6c98b131 Mon Sep 17 00:00:00 2001 From: Hemang Rathod Date: Thu, 12 Sep 2024 17:35:11 +1000 Subject: [PATCH 1/4] Added x-version-notes and x-diff custom extension keys. x-version-notes allows capturing API version notes. x-diff allows capturing diff statements against specific API or schemas --- .../widdershins-cdr/templates/openapi3/main.dot | 5 +++++ .../widdershins-cdr/templates/openapi3/operation.dot | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/swagger-gen/widdershins-cdr/templates/openapi3/main.dot b/swagger-gen/widdershins-cdr/templates/openapi3/main.dot index 7352c633..fa7de985 100644 --- a/swagger-gen/widdershins-cdr/templates/openapi3/main.dot +++ b/swagger-gen/widdershins-cdr/templates/openapi3/main.dot @@ -30,6 +30,11 @@ {{ var schema = data.api.components.schemas[s]; }}

{{= s }}

+{{? schema["x-diff"] }} +```diff +{{= schema["x-diff"]}} +``` +{{?}}

diff --git a/swagger-gen/widdershins-cdr/templates/openapi3/operation.dot b/swagger-gen/widdershins-cdr/templates/openapi3/operation.dot index 93c5c2d2..473ebded 100644 --- a/swagger-gen/widdershins-cdr/templates/openapi3/operation.dot +++ b/swagger-gen/widdershins-cdr/templates/openapi3/operation.dot @@ -2,6 +2,11 @@ {{ data.cds_uniqueAnchorPrefix = data.title_prefix + '_' + data.cds_operationUniqueSlug; }}

{{= data.operationUniqueName}}

+{{? data.operation["x-diff"] }} +```diff +{{= data.operation["x-diff"]}} +``` +{{?}}

{{? data.operation.operationId}} @@ -44,6 +49,11 @@ |---|--| |Version|**{{? data.operation["x-version"]}}{{= data.operation["x-version"]}}{{??}}Versioning is not supported for this endpoint{{?}}** +{{? data.operation["x-version-notes"]}} +

Version Notes

+{{= data.operation["x-version-notes"]}} +{{?}} + {{? data.parameters && data.parameters.length }} {{#def.parameters}} {{?}} From 74610ccd996096354cebd79ee9473b85cc74ec3e Mon Sep 17 00:00:00 2001 From: Hemang Rathod Date: Thu, 12 Sep 2024 17:36:11 +1000 Subject: [PATCH 2/4] Standards Maintenance Issue #653: Amended description of dailySupplyChargeType field --- .../includes/releasenotes/releasenotes.1.32.0.html.md | 4 ++-- swagger-gen/api/cds_energy.json | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/slate/source/includes/releasenotes/releasenotes.1.32.0.html.md b/slate/source/includes/releasenotes/releasenotes.1.32.0.html.md index 3ef0a75c..034f39eb 100644 --- a/slate/source/includes/releasenotes/releasenotes.1.32.0.html.md +++ b/slate/source/includes/releasenotes/releasenotes.1.32.0.html.md @@ -21,7 +21,7 @@ This release addresses the following minor defects raised on [Standards Staging] This release addresses the following change requests raised on [Standards Maintenance](https://github.com/ConsumerDataStandardsAustralia/standards-maintenance/issues): -- [Standards Maintenance #XXX - Title](https://github.com/ConsumerDataStandardsAustralia/standards-maintenance/issues/XXX) +- [Standards Maintenance #653 - EnergyPlanTariffPeriod - cater for plans with no dailySupplyCharge](https://github.com/ConsumerDataStandardsAustralia/standards-maintenance/issues/653) ### Decision Proposals @@ -51,7 +51,7 @@ This release addresses the following Decision Proposals published on [Standards] ## API Endpoints |Change|Description|Link| |------|-----------|----| - +| Amend dailySupplyChargeType description | [**Standards Maintenance #653**](https://github.com/ConsumerDataStandardsAustralia/standards-maintenance/issues/653): Amended the description of the dailySupplyChargeType field to remove the default value assumption of `SINGLE` if the field is not provided, allowing plans without a specific daily supply charge to be shared. This change will be included in the existing 11 Nov 2024 FDO for Get Generic Plan Detail v4 and Get Energy Account Detail v5, and will be treated as errata to avoid a version update.| [EnergyPlanContractV3](../../#cdr-energy-api_schemas_tocSenergyplancontractv3) ## Information Security Profile |Change|Description|Link| diff --git a/swagger-gen/api/cds_energy.json b/swagger-gen/api/cds_energy.json index fc3a4206..0c1f952d 100644 --- a/swagger-gen/api/cds_energy.json +++ b/swagger-gen/api/cds_energy.json @@ -674,6 +674,7 @@ }, "EnergyPlanContractV3": { "type": "object", + "x-diff": "Updated description of dailySupplyChargeType from: \n+ Specifies if daily supply charge is single or banded. Default value is SINGLE if field not provided with a new line\nto:\n- Specifies if daily supply charge is single or banded.", "required": [ "pricingModel", "isFixed", @@ -1560,7 +1561,7 @@ }, "dailySupplyChargeType": { "type": "string", - "description": "Specifies if daily supply charge is single or banded. Default value is SINGLE if field not provided", + "description": "Specifies if daily supply charge is single or banded.", "enum": ["SINGLE", "BAND" ] @@ -4851,6 +4852,8 @@ "Generic Tariffs" ], "x-version": "3", + "x-version-notes": "- The dailySupplyChargeType field was added in endpoint v3 as part of Standards v1.30.0. In Standards v1.32.0, the description of that field was changed to remove the default value, but it did not result in a new endpoint version. Refer to the [v1.32.0 release notes](includes/releasenotes/releasenotes.1.32.0.html) for more details.", + "x-diff": "Removed the default value assumption of SINGLE for the dailySupplyChargeType field when not provided", "parameters": [{ "name": "planId", "description": "ID of the specific plan requested", @@ -5871,6 +5874,8 @@ "Energy Accounts" ], "x-version": "4", + "x-version-notes": "- The dailySupplyChargeType field was added in endpoint v3 as part of Standards v1.30.0. In Standards v1.32.0, the description of that field was changed to remove the default value, but it did not result in a new endpoint version. Refer to the [v1.32.0 release notes](includes/releasenotes/releasenotes.1.32.0.html) for more details.", + "x-diff": "Removed the default value assumption of SINGLE for the dailySupplyChargeType field when not provided", "parameters": [{ "$ref": "#/components/parameters/accountId" }, From c8bfdff762473ba30bdae51fc8a14a7bd28fbcb3 Mon Sep 17 00:00:00 2001 From: Hemang Rathod Date: Thu, 12 Sep 2024 18:51:57 +1000 Subject: [PATCH 3/4] Standards Maintenance Issue #653: Fixed incorrect diff statement --- swagger-gen/api/cds_energy.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger-gen/api/cds_energy.json b/swagger-gen/api/cds_energy.json index 0c1f952d..aec78def 100644 --- a/swagger-gen/api/cds_energy.json +++ b/swagger-gen/api/cds_energy.json @@ -674,7 +674,7 @@ }, "EnergyPlanContractV3": { "type": "object", - "x-diff": "Updated description of dailySupplyChargeType from: \n+ Specifies if daily supply charge is single or banded. Default value is SINGLE if field not provided with a new line\nto:\n- Specifies if daily supply charge is single or banded.", + "x-diff": "Updated description of dailySupplyChargeType from: \n- Specifies if daily supply charge is single or banded. Default value is SINGLE if field not provided with a new line\nto:\n+ Specifies if daily supply charge is single or banded.", "required": [ "pricingModel", "isFixed", From 2a52100bafa6fdff92b3f53085d9c9cab8d4f6ed Mon Sep 17 00:00:00 2001 From: Hemang Rathod Date: Fri, 20 Sep 2024 15:49:33 +1000 Subject: [PATCH 4/4] Removed x-diff custom key from json swagger. Moved diff statement into energy erb file --- slate/source/includes/_energy_apis.md.erb | 9 +++++++-- .../includes/releasenotes/releasenotes.1.32.0.html.md | 2 +- swagger-gen/api/cds_energy.json | 3 --- swagger-gen/widdershins-cdr/templates/openapi3/main.dot | 5 ----- .../widdershins-cdr/templates/openapi3/operation.dot | 5 ----- 5 files changed, 8 insertions(+), 16 deletions(-) diff --git a/slate/source/includes/_energy_apis.md.erb b/slate/source/includes/_energy_apis.md.erb index 5524d3c3..78f4c214 100644 --- a/slate/source/includes/_energy_apis.md.erb +++ b/slate/source/includes/_energy_apis.md.erb @@ -1,6 +1,13 @@ # Energy APIs +```diff +Updated description of EnergyPlanTariffPeriodV2.dailySupplyChargeType from: +- Specifies if daily supply charge is single or banded. Default value is SINGLE if field not provided with a new line. +to: ++ Specifies if daily supply charge is single or banded. +``` + This specification defines the APIs for Data Holders exposing Energy endpoints. @@ -8,6 +15,4 @@ This specification defines the APIs for Data Holders exposing Energy endpoints.
Energy OpenAPI Specification (YAML)
- - <%= partial "includes/cds_energy.md" %> diff --git a/slate/source/includes/releasenotes/releasenotes.1.32.0.html.md b/slate/source/includes/releasenotes/releasenotes.1.32.0.html.md index 034f39eb..e33b9e75 100644 --- a/slate/source/includes/releasenotes/releasenotes.1.32.0.html.md +++ b/slate/source/includes/releasenotes/releasenotes.1.32.0.html.md @@ -51,7 +51,7 @@ This release addresses the following Decision Proposals published on [Standards] ## API Endpoints |Change|Description|Link| |------|-----------|----| -| Amend dailySupplyChargeType description | [**Standards Maintenance #653**](https://github.com/ConsumerDataStandardsAustralia/standards-maintenance/issues/653): Amended the description of the dailySupplyChargeType field to remove the default value assumption of `SINGLE` if the field is not provided, allowing plans without a specific daily supply charge to be shared. This change will be included in the existing 11 Nov 2024 FDO for Get Generic Plan Detail v4 and Get Energy Account Detail v5, and will be treated as errata to avoid a version update.| [EnergyPlanContractV3](../../#cdr-energy-api_schemas_tocSenergyplancontractv3) +| Amend dailySupplyChargeType description | [**Standards Maintenance #653**](https://github.com/ConsumerDataStandardsAustralia/standards-maintenance/issues/653): Amended the description of the EnergyPlanTariffPeriodV2.dailySupplyChargeType field to remove the default value assumption of `SINGLE` if the field is not provided, allowing plans without a specific daily supply charge to be shared. This change will be included in the existing 11 Nov 2024 FDO for Get Generic Plan Detail v4 and Get Energy Account Detail v5, and will be treated as errata to avoid a version update.| [Energy APIs](../../#energy-apis) ## Information Security Profile |Change|Description|Link| diff --git a/swagger-gen/api/cds_energy.json b/swagger-gen/api/cds_energy.json index aec78def..bd0a0a9f 100644 --- a/swagger-gen/api/cds_energy.json +++ b/swagger-gen/api/cds_energy.json @@ -674,7 +674,6 @@ }, "EnergyPlanContractV3": { "type": "object", - "x-diff": "Updated description of dailySupplyChargeType from: \n- Specifies if daily supply charge is single or banded. Default value is SINGLE if field not provided with a new line\nto:\n+ Specifies if daily supply charge is single or banded.", "required": [ "pricingModel", "isFixed", @@ -4853,7 +4852,6 @@ ], "x-version": "3", "x-version-notes": "- The dailySupplyChargeType field was added in endpoint v3 as part of Standards v1.30.0. In Standards v1.32.0, the description of that field was changed to remove the default value, but it did not result in a new endpoint version. Refer to the [v1.32.0 release notes](includes/releasenotes/releasenotes.1.32.0.html) for more details.", - "x-diff": "Removed the default value assumption of SINGLE for the dailySupplyChargeType field when not provided", "parameters": [{ "name": "planId", "description": "ID of the specific plan requested", @@ -5875,7 +5873,6 @@ ], "x-version": "4", "x-version-notes": "- The dailySupplyChargeType field was added in endpoint v3 as part of Standards v1.30.0. In Standards v1.32.0, the description of that field was changed to remove the default value, but it did not result in a new endpoint version. Refer to the [v1.32.0 release notes](includes/releasenotes/releasenotes.1.32.0.html) for more details.", - "x-diff": "Removed the default value assumption of SINGLE for the dailySupplyChargeType field when not provided", "parameters": [{ "$ref": "#/components/parameters/accountId" }, diff --git a/swagger-gen/widdershins-cdr/templates/openapi3/main.dot b/swagger-gen/widdershins-cdr/templates/openapi3/main.dot index fa7de985..7352c633 100644 --- a/swagger-gen/widdershins-cdr/templates/openapi3/main.dot +++ b/swagger-gen/widdershins-cdr/templates/openapi3/main.dot @@ -30,11 +30,6 @@ {{ var schema = data.api.components.schemas[s]; }}

{{= s }}

-{{? schema["x-diff"] }} -```diff -{{= schema["x-diff"]}} -``` -{{?}}

diff --git a/swagger-gen/widdershins-cdr/templates/openapi3/operation.dot b/swagger-gen/widdershins-cdr/templates/openapi3/operation.dot index 473ebded..9285223f 100644 --- a/swagger-gen/widdershins-cdr/templates/openapi3/operation.dot +++ b/swagger-gen/widdershins-cdr/templates/openapi3/operation.dot @@ -2,11 +2,6 @@ {{ data.cds_uniqueAnchorPrefix = data.title_prefix + '_' + data.cds_operationUniqueSlug; }}

{{= data.operationUniqueName}}

-{{? data.operation["x-diff"] }} -```diff -{{= data.operation["x-diff"]}} -``` -{{?}}

{{? data.operation.operationId}}