Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Fixes issue 43, fixes class type hint for required prop that is not in properties #44

Merged
merged 2 commits into from
Oct 18, 2022

Conversation

spacether
Copy link
Contributor

@spacether spacether commented Oct 18, 2022

Fixes issue 43, fixes new type hint for required prop that is not in properties
Verification test was added:

    def test_model_instantiation(self):
        inst = ObjectWithAllOfWithReqTestPropFromUnsetAddProp(
            test='a'
        )
        assert inst == {'test': 'a'}

        # without the required test property an execption is thrown
        with self.assertRaises(petstore_api.exceptions.ApiTypeError):
            ObjectWithAllOfWithReqTestPropFromUnsetAddProp(
                name='a'
            )

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/python*.
    For Windows users, please run the script in Git BASH.

@spacether spacether merged commit 4f97227 into master Oct 18, 2022
@spacether spacether deleted the issue-43_fix_required_from_unset_addprops branch October 18, 2022 16:08
@spacether spacether changed the title Fixes issue 43, fixes new type hint for required prop that is not in properties Fixes issue 43, fixes class type hint for required prop that is not in properties Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Required property not in properties refers to nonexistant definition
1 participant