Skip to content

Commit

Permalink
feat: remove --terms-of-service parameter (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
blackchoey authored Apr 16, 2024
1 parent d480a18 commit 2ffa2bb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
max_length=200,
),
)
_args_schema.terms_of_service = AAZObjectArg(
options=["--terms-of-service"],
arg_group="Properties",
help="Terms of service for the API.",
)
_args_schema.title = AAZStrArg(
options=["--title"],
arg_group="Properties",
Expand Down Expand Up @@ -214,16 +209,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
max_length=200,
),
)

terms_of_service = cls._args_schema.terms_of_service
terms_of_service.url = AAZStrArg(
options=["url"],
help="URL pointing to the terms of service.",
required=True,
fmt=AAZStrArgFormat(
max_length=200,
),
)
return cls._args_schema

def _execute_operations(self):
Expand Down Expand Up @@ -335,7 +320,6 @@ def content(self):
properties.set_prop("kind", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}})
properties.set_prop("license", AAZObjectType, ".license")
properties.set_prop("summary", AAZStrType, ".summary")
properties.set_prop("termsOfService", AAZObjectType, ".terms_of_service")
properties.set_prop("title", AAZStrType, ".title", typ_kwargs={"flags": {"required": True}})

contacts = _builder.get(".properties.contacts")
Expand Down Expand Up @@ -368,10 +352,6 @@ def content(self):
license.set_prop("name", AAZStrType, ".name")
license.set_prop("url", AAZStrType, ".url")

terms_of_service = _builder.get(".properties.termsOfService")
if terms_of_service is not None:
terms_of_service.set_prop("url", AAZStrType, ".url", typ_kwargs={"flags": {"required": True}})

return self.serialize_content(_content_value)

def on_200_201(self, session):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
max_length=200,
),
)
_args_schema.terms_of_service = AAZObjectArg(
options=["--terms-of-service"],
arg_group="Properties",
help="Terms of service for the API.",
nullable=True,
)
_args_schema.title = AAZStrArg(
options=["--title"],
arg_group="Properties",
Expand Down Expand Up @@ -234,15 +228,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
max_length=200,
),
)

terms_of_service = cls._args_schema.terms_of_service
terms_of_service.url = AAZStrArg(
options=["url"],
help="URL pointing to the terms of service.",
fmt=AAZStrArgFormat(
max_length=200,
),
)
return cls._args_schema

def _execute_operations(self):
Expand Down Expand Up @@ -491,7 +476,6 @@ def _update_instance(self, instance):
properties.set_prop("kind", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}})
properties.set_prop("license", AAZObjectType, ".license")
properties.set_prop("summary", AAZStrType, ".summary")
properties.set_prop("termsOfService", AAZObjectType, ".terms_of_service")
properties.set_prop("title", AAZStrType, ".title", typ_kwargs={"flags": {"required": True}})

contacts = _builder.get(".properties.contacts")
Expand Down Expand Up @@ -524,10 +508,6 @@ def _update_instance(self, instance):
license.set_prop("name", AAZStrType, ".name")
license.set_prop("url", AAZStrType, ".url")

terms_of_service = _builder.get(".properties.termsOfService")
if terms_of_service is not None:
terms_of_service.set_prop("url", AAZStrType, ".url", typ_kwargs={"flags": {"required": True}})

return _instance_value

class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.51.0"
"azext.minCliCoreVersion": "2.57.0"
}

0 comments on commit 2ffa2bb

Please sign in to comment.