You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I am attempting to create automated tests and documentation from a complex schema object. The language I am currently working in is python although I believe this would be a feature request of the Generator.
I am using the jar file for version 7.2.0 of the generator.
Given the following path spec, I am not able to access any vars past the first level of properties. I would want to use examples that are on each property but that doesn't give me quite what I need/expect.
Using what is available now I can generate the following example, which is mostly correct minus the nested objects like owner, source, etc...
paths:
/access-profiles:
post:
operationId: createAccessProfiletags:
- Access Profilessummary: Create an Access Profiledescription: >- This API creates an Access Profile. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API. In addition, a token with only ROLE_SUBADMIN or SOURCE_SUBADMIN authority must be associated with the Access Profile's Source. The maximum supported length for the description field is 2000 characters. Longer descriptions will be preserved for existing access profiles, however, any new access profiles as well as any updates to existing descriptions will be limited to 2000 characters.requestBody:
required: truecontent:
application/json:
schema:
type: objectdescription: Access Profileproperties:
id:
type: stringdescription: The ID of the Access Profileexample: 2c91808a7190d06e01719938fcd20792readOnly: truename:
type: stringdescription: Name of the Access Profileexample: Employee-database-read-writedescription:
type: stringnullable: truedescription: Information about the Access Profileexample: Collection of entitlements to read/write the employee databasecreated:
type: stringdescription: Date the Access Profile was createdformat: 'date-time'example: '2021-03-01T22:32:58.104Z'readOnly: truemodified:
type: stringdescription: Date the Access Profile was last modified.format: 'date-time'example: '2021-03-02T20:22:28.104Z'readOnly: trueenabled:
type: booleandefault: truedescription: Whether the Access Profile is enabled. If the Access Profile is enabled then you must include at least one Entitlement.example: trueowner:
type: objectnullable: falsedescription: The owner of this object.properties:
type:
type: string enum:
- IDENTITYdescription: Owner type. This field must be either left null or set to 'IDENTITY' on input, otherwise a 400 Bad Request error will result.example: 'IDENTITY'id:
type: stringdescription: Identity idexample: '2c9180a46faadee4016fb4e018c20639'name:
type: stringdescription: Human-readable display name of the owner. It may be left null or omitted in a POST or PATCH. If set, it must match the current value of the owner's display name, otherwise a 400 Bad Request error will result.example: 'support'source:
type: objectproperties:
id:
type: stringdescription: The ID of the Source with with which the Access Profile is associatedexample: 2c91809773dee3610173fdb0b6061ef4type:
type: stringenum:
- SOURCEdescription: The type of the Source, will always be SOURCEexample: SOURCEname:
type: stringdescription: The display name of the associated Sourceexample: "ODS-AD-SOURCE"entitlements:
type: arraynullable: truedescription: A list of entitlements associated with the Access Profile. If enabled is false this is allowed to be empty otherwise it needs to contain at least one Entitlement.items:
type: objectdescription: Entitlement including a specific set of access.properties:
type:
type: string description: Entitlement's DTO type. enum:
- ENTITLEMENTexample: ENTITLEMENTid:
type: stringdescription: Entitlement's ID. example: 2c91809773dee32014e13e122092014ename:
type: stringnullable: truedescription: Entitlement's display name. example: "CN=entitlement.490efde5,OU=OrgCo,OU=ServiceDept,DC=HQAD,DC=local"requestable:
type: booleandefault: truedescription: >- Whether the Access Profile is requestable via access request. Currently, making an Access Profile non-requestable is only supported for customers enabled with the new Request Center. Otherwise, attempting to create an Access Profile with a value **false** in this field results in a 400 error.example: trueaccessRequestConfig:
type: objectnullable : trueproperties:
commentsRequired:
type: booleandescription: Whether the requester of the containing object must provide comments justifying the requestexample: truenullable: truedefault: falsedenialCommentsRequired:
type: booleandescription: Whether an approver must provide comments when denying the requestexample: truenullable: truedefault: falseapprovalSchemes:
type: arraynullable : truedescription: List describing the steps in approving the requestitems:
type: objectproperties:
approverType:
type: stringenum:
- APP_OWNER
- OWNER
- SOURCE_OWNER
- MANAGER
- GOVERNANCE_GROUPdescription: >- Describes the individual or group that is responsible for an approval step. Values are as follows. **APP_OWNER**: The owner of the Application **OWNER**: Owner of the associated Access Profile or Role **SOURCE_OWNER**: Owner of the Source associated with an Access Profile **MANAGER**: Manager of the Identity making the request **GOVERNANCE_GROUP**: A Governance Group, the ID of which is specified by the **approverId** fieldexample: GOVERNANCE_GROUPapproverId:
type: stringnullable: truedescription: Id of the specific approver, used only when approverType is GOVERNANCE_GROUPexample: 46c79819-a69f-49a2-becb-12c971ae66c6revocationRequestConfig:
type: objectnullable : trueproperties:
approvalSchemes:
type: arraynullable: truedescription: List describing the steps in approving the revocation requestitems:
type: objectproperties:
approverType:
type: stringenum:
- APP_OWNER
- OWNER
- SOURCE_OWNER
- MANAGER
- GOVERNANCE_GROUPdescription: >- Describes the individual or group that is responsible for an approval step. Values are as follows. **APP_OWNER**: The owner of the Application **OWNER**: Owner of the associated Access Profile or Role **SOURCE_OWNER**: Owner of the Source associated with an Access Profile **MANAGER**: Manager of the Identity making the request **GOVERNANCE_GROUP**: A Governance Group, the ID of which is specified by the **approverId** fieldexample: GOVERNANCE_GROUPapproverId:
type: stringnullable: truedescription: Id of the specific approver, used only when approverType is GOVERNANCE_GROUPexample: 46c79819-a69f-49a2-becb-12c971ae66c6segments:
type: arraynullable: trueitems:
type: stringdescription: List of IDs of segments, if any, to which this Access Profile is assigned.example: ["f7b1b8a3-5fed-4fd4-ad29-82014e137e19","29cb6c06-1da8-43ea-8be4-b3125f248f2a"]provisioningCriteria:
type: objectnullable: truedescription: Defines matching criteria for an Account to be provisioned with a specific Access Profileproperties:
operation:
type: stringenum:
- EQUALS
- NOT_EQUALS
- CONTAINS
- HAS
- AND
- ORdescription: Supported operations on ProvisioningCriteriaexample: EQUALSattribute:
type: stringdescription: >- Name of the Account attribute to be tested. If **operation** is one of EQUALS, NOT_EQUALS, CONTAINS, or HAS, this field is required. Otherwise, specifying it is an error.example: emailnullable: truevalue:
type: stringnullable: truedescription: >- String value to test the Account attribute w/r/t the specified operation. If the operation is one of EQUALS, NOT_EQUALS, or CONTAINS, this field is required. Otherwise, specifying it is an error. If the Attribute is not String-typed, it will be converted to the appropriate type.example: "carlee.cert1c9f9b6fd@mailinator.com"children:
type: arrayitems:
type: objectdescription: Defines matching criteria for an Account to be provisioned with a specific Access Profileproperties:
operation:
type: stringenum:
- EQUALS
- NOT_EQUALS
- CONTAINS
- HAS
- AND
- ORdescription: Supported operations on ProvisioningCriteriaexample: EQUALSattribute:
type: stringdescription: >- Name of the Account attribute to be tested. If **operation** is one of EQUALS, NOT_EQUALS, CONTAINS, or HAS, this field is required. Otherwise, specifying it is an error.example: emailnullable: truevalue:
type: stringnullable: truedescription: >- String value to test the Account attribute w/r/t the specified operation. If the operation is one of EQUALS, NOT_EQUALS, or CONTAINS, this field is required. Otherwise, specifying it is an error. If the Attribute is not String-typed, it will be converted to the appropriate type.example: "carlee.cert1c9f9b6fd@mailinator.com"children:
type: arrayitems:
type: objectdescription: Defines matching criteria for an Account to be provisioned with a specific Access Profileproperties:
operation:
type: stringenum:
- EQUALS
- NOT_EQUALS
- CONTAINS
- HAS
- AND
- ORdescription: Supported operations on ProvisioningCriteriaexample: EQUALSattribute:
type: stringdescription: >- Name of the Account attribute to be tested. If **operation** is one of EQUALS, NOT_EQUALS, CONTAINS, or HAS, this field is required. Otherwise, specifying it is an error.example: emailnullable: truevalue:
type: stringdescription: >- String value to test the Account attribute w/r/t the specified operation. If the operation is one of EQUALS, NOT_EQUALS, or CONTAINS, this field is required. Otherwise, specifying it is an error. If the Attribute is not String-typed, it will be converted to the appropriate type.example: "carlee.cert1c9f9b6fd@mailinator.com"children:
type: stringdescription: >- Array of child criteria. Required if the operation is AND or OR, otherwise it must be left null. A maximum of three levels of criteria are supported, including leaf nodes.example: nullnullable: truenullable: truedescription: >- Array of child criteria. Required if the operation is AND or OR, otherwise it must be left null. A maximum of three levels of criteria are supported, including leaf nodes.example: nullnullable: truedescription: >- Array of child criteria. Required if the operation is AND or OR, otherwise it must be left null. A maximum of three levels of criteria are supported, including leaf nodes.example: nullrequired:
- owner
- name
- sourceresponses:
'201':
description: Access Profile createdcontent:
application/json:
schema:
type: objectsecurity:
- UserContextAuth: [idn:access-profile:manage]
It looks like I have access to the CamelCased initializers for each nested variable( owner, source, etc...) on the CodegenProperty but the vars object is empty for any nested variables. I am thinking I could build out the example code myself in the mustache template if I had access to all nested variables.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I am attempting to create automated tests and documentation from a complex schema object. The language I am currently working in is
python
although I believe this would be a feature request of the Generator.I am using the jar file for version 7.2.0 of the generator.
Given the following path spec, I am not able to access any vars past the first level of properties. I would want to use examples that are on each property but that doesn't give me quite what I need/expect.
Using what is available now I can generate the following example, which is mostly correct minus the nested objects like owner, source, etc...
Mustache:
Describe the solution you'd like
What I would expect it to look like is below:
It looks like I have access to the CamelCased initializers for each nested variable( owner, source, etc...) on the CodegenProperty but the
vars
object is empty for any nested variables. I am thinking I could build out the example code myself in the mustache template if I had access to all nested variables.Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: