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

replace hard coded http status code #255

Conversation

priyakumarank
Copy link
Collaborator

#242

What this PR does / why we need it:

  • Replaces hard coded status codes with constants from http package

Special notes for your reviewer:

If applicable:

  • this PR contains documentation
  • this PR contains tests

@priyakumarank priyakumarank marked this pull request as ready for review October 1, 2019 06:49
Copy link
Contributor

@frodopwns frodopwns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgttm thanks!

@priyakumarank priyakumarank merged commit 2792ae9 into Azure:master Oct 2, 2019
Porges pushed a commit that referenced this pull request May 11, 2021
* Add BaseType() to EnumType and improve test coverage

* Add WithoutValidation() to PropertyDefinition and test

* Create pipeline stage for creating storage types and test

* Exclude storage generation from golden tests

* Update TypeVisitor for StorageType

* Add ApplyObjectTransformation() to TypeDefinition and test

* Add ApplyObjectTransformations() to TypeDefinition and test

* Extend default visitor to avoid rewrapping ArmTypes

* Add predicates to Types

Where a TypeName is passed, the definition will be looked up, recursively. Also includes related methods IsArmDefinition() and IsArmResource().

* Refactor Pipeline step for creating ARM types

* Modify ArmType to implement Type with pointer receiver

* Code gardening

* Fix compilation errors in tests

* Use predicates to identify ARM resources

* Add IsResourceDefinition() predicate

* Modify getReceiverObjectType() to unwrap ArmType

* Defensive logging in pipeline

* Fix errors references

* Modify how ReferenceGraph detects ArmSpec and ArmStatus types

* Add AsResourceType() conversion method

* Fix tests

* Address lint issues

* Fix issue with TypeVisitor

* Remove obsolete test

* Renaming for clarity

* Change predicate to conversion method ResolveEnumDefinition()

* Eliminate nil case for StorageType

* Add missing docComments

* Simplify implementation of ApplyObjectTransformations()

* Return error instead of panicing

* Fix visiting of StorageType to accommodate more transformations

* Removed unused IsArm*() methods

* Use accessor method Type() instead of directly accessing the member

* Clarify comment about defensive cloning

* Remove blank line

* Remove commented code

* Reformat parameter wrapping

* Change return type to `TypeName`

* Update for PackageReference interface use

* Rename method to mapTypeNameIntoStoragePackage for clarity

* Add pipeline stage to simplify types

* Address PR feedback

* Update consumption of PackageReferences

* Update comments in reference_graph for clarity

* Code gardening

* Use propertyConversions to create storage properties

* Remove check that's not needed in TypeVisitor

* Restore deleted comment

* Address issues identified in PR

* Use %T to show types in type visitor errors

* Rename methods to make declarative use clearer

* Remove redundant context call

* Apply suggestions from code review

Co-authored-by: Christian Muirhead <christian.muirhead@microsoft.com>

* Rename method to reflect pointer return

* Include index of transformation in error

* Code gardening

* Fix bug passing wrong context to visitor

Co-authored-by: Christian Muirhead <christian.muirhead@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants