-
Notifications
You must be signed in to change notification settings - Fork 42
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
Payload validation #534
Payload validation #534
Conversation
497aba0
to
e8fd71e
Compare
@@ -53,7 +53,7 @@ def openapi_group() -> None: | |||
|
|||
@openapi_group.command() | |||
@pass_pulp_context | |||
def schema(pulp_ctx: PulpContext) -> None: | |||
def spec(pulp_ctx: PulpContext) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if we should move the whole "openapi" command group one level up (from pulp debug openapi
to pulp openapi
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm, I don't have a strong opinion either way. I think I lean ever so slightly to "leave it under the 'debug' top level, because that's what we're doing"
@@ -53,7 +53,7 @@ def openapi_group() -> None: | |||
|
|||
@openapi_group.command() | |||
@pass_pulp_context | |||
def schema(pulp_ctx: PulpContext) -> None: | |||
def spec(pulp_ctx: PulpContext) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm, I don't have a strong opinion either way. I think I lean ever so slightly to "leave it under the 'debug' top level, because that's what we're doing"
pulpcore/cli/common/debug.py
Outdated
result = pulp_ctx.api.api_spec["components"]["schemas"][schema_name] | ||
except KeyError: | ||
raise click.ClickException( | ||
_("No schem component with name {schema_name} found.").format(schema_name=schema_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_("No schem component with name {schema_name} found.").format(schema_name=schema_name) | |
_("No schema component with name {schema_name} found.").format(schema_name=schema_name) |
repository_ctx.pulp_href | ||
for repository_ctx in repository | ||
if isinstance(repository_ctx, PulpEntityContext) | ||
] + list(repository_href) | ||
|
||
exporter_ctx.update(exporter_href, the_exporter) | ||
exporter_ctx.update(exporter_href, payload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for this change to be linked to the openapi-validation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad that you ask! Yes. the_exporter
is the answer of a GET
request and it contains fields like pulp_created
, pulp_href
and so on. Those are not meant to be in the set of parameters of a PATCH
call. And out new linting alerts on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good. The test-failures are all pulp_python and bandersnatch being mad at each other. Looks good to go otherwise.
No description provided.