Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[csharp][generichost] Implement not required nullable properties #16810

Merged

Conversation

devhl-labs
Copy link
Contributor

@devhl-labs devhl-labs commented Oct 12, 2023

Fixes #16520

Breaking change without fallback due to changing the order of model properties. Not required, nullable, and any values with a default now at the end of the model's signature since the user does not have to provide anything for those properties.

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/configs/*.yaml
    ./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/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (upcoming 7.1.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@devhl-labs devhl-labs marked this pull request as ready for review November 5, 2023 22:04
@wing328
Copy link
Member

wing328 commented Nov 6, 2023

as discussed if the users prefer the old(existing) order of the parameters, we will create csharp-deprecated as the fallback.

@wing328
Copy link
Member

wing328 commented Nov 6, 2023

@wing328 wing328 merged commit 7e52992 into OpenAPITools:master Nov 13, 2023
33 checks passed
@SDP190
Copy link
Contributor

SDP190 commented Nov 13, 2023

Wow @devhl-labs thank you so much for this so valuable and important feature! I see it really was a lot of work! Very useful and much appreciated!

Has this been released already to npm?

@devhl-labs devhl-labs deleted the 16520-notrequired-nullable-properties branch November 13, 2023 19:07
@devhl-labs
Copy link
Contributor Author

Probably, but i am not familiar with that.

jpuerto pushed a commit to movementsciences/openapi-generator that referenced this pull request Nov 14, 2023
…nAPITools#16810)

* init

* fixed read and write

* completed changes using latest-nrt sample

* fixed all samples

* add null check on write, change on exception

* resolved conflicts

* build samples

* added backing property for not required properties

* more not required and nullable hanlding improvements

* revert sample updates for a merge master

* revert sample updates for a merge master

* sample build is working, need to remove warnings

* fixed warnings in .net 7 with nrt

* fixed manual tests

* fixed all samples

* fix npe

* removed debugging lines

* revert changes to unused file

* removed unused lambdas

* fix a serialization bug

* make option a hidden property

* updated documentation

* improved parameter ordering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REQ] [csharp] Support optional not-nullable properties
3 participants