Skip to content

Commit

Permalink
Show format of request parameter enums correctly
Browse files Browse the repository at this point in the history
Addresses: #349
  • Loading branch information
nils-work committed Dec 18, 2023
1 parent 3a6a594 commit ddee2d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Release notes for version v1.29.0 of the [CDR Standards](../../index.html).

This release addresses the following minor defects raised on [Standards Staging](https://github.com/ConsumerDataStandardsAustralia/standards-staging/issues):

- [Staging Issue xxx - Description](https://github.com/ConsumerDataStandardsAustralia/standards-staging/issues/xxx)
- [Staging Issue 349 - Enum parameters in endpoints are not reflected correctly](https://github.com/ConsumerDataStandardsAustralia/standards-staging/issues/349)

This release addresses the following change requests raised on [Standards Maintenance](https://github.com/ConsumerDataStandardsAustralia/standards-maintenance/issues):

Expand All @@ -32,6 +32,7 @@ This release addresses the following Decision Proposals published on [Standards]
## General Changes
|Change|Description|Link|
|------|-----------|----|
| Enum property type | **[Standards Staging #349](https://github.com/ConsumerDataStandardsAustralia/standards-staging/issues/349):** Request parameters defined with enumerated values will now show the type as 'Enum' instead of 'string' | Request Parameters tables |


## Introduction
Expand Down
4 changes: 3 additions & 1 deletion slate/source/includes/standards/_types.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Common Field Types


```diff
Properties defined in request parameters with enumerated values will now correctly show the type as 'Enum' instead of 'string'
```

The following table outlines the common data types for fields used in the standard.

Expand Down
4 changes: 4 additions & 0 deletions swagger-gen/widdershins-cdr/openapi3.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ function getParameters(data) {
if (typeof param['x-conditional'] === 'boolean') {
param.cdrConditional = param['x-conditional'];
}

if (param.schema && param.schema.enum) {
param.cdrType = '[Enum](#common-field-types)';
}
}

let effSecurity;
Expand Down

0 comments on commit ddee2d7

Please sign in to comment.