Repository navigation
fix(spec): remove lifecycle markup from PolicyType DEVICE_SIGNAL_COLLECTION value - #602
Open
iftikharlodhi1-prog wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In
openapi/api.yaml, thePolicyTypeenum contains this value:- <x-lifecycle class="ea"></x-lifecycle> DEVICE_SIGNAL_COLLECTIONA documentation lifecycle badge leaked into the enum value itself. The generator turned it into a member whose value contains the HTML tag, and there is no plain
DEVICE_SIGNAL_COLLECTIONmember.The API returns
"DEVICE_SIGNAL_COLLECTION".Policy.from_dictcorrectly routes that string toDeviceSignalCollectionPolicy, but validation of thetypefield then fails:As a result,
get_policyandlist_policiesraise for any org that has a device signal collection policy. Also,PolicyType("DEVICE_SIGNAL_COLLECTION")raisesValueError.Fix
openapi/api.yaml: the enum value is nowDEVICE_SIGNAL_COLLECTION. The badge stays in the description, where it belongs.okta/models/policy_type.py: the mangled member is replaced withDEVICE_SIGNAL_COLLECTION = "DEVICE_SIGNAL_COLLECTION". This matches what the generator produces from the corrected spec.tests/test_policy_type_enum.py: new regression tests covering:to_dictround tripTesting
master(6 failures) and pass with this change (14 passed).pytest tests --ignore=tests/integrationgives 260 passed.Related
The same markup appears in
okta/okta-sdk-nodejs(oas-spec/management.yaml, 3 occurrences), so the Node SDK likely has the same problem.