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

Fixes 3877: Add required fields for API spec requests #870

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Andrewgdewar
Copy link
Contributor

Summary

  • Add required fields for API spec requests.

Testing steps

@jlsherrill
Copy link
Member

@swadeley
Copy link
Member

swadeley commented Nov 1, 2024

Hi

How to test these changes?

If I take the first one:

   "definitions": {
        "api.AddUploadsRequest": {
            "type": "object",
            "required": [
                "artifacts",
                "uploads"
            ],

Looking at "add_upload" in ephemeral I do not see anything different to that in stage:

app.content_sources.rest_client.repositories_api.add_upload.
                                                                      allowed_values  call_with_http_info() headers_map           params_map           
                                                                      api_client            callable()            location_map          settings             
                                                                      attribute_map         collection_format_map openapi_types         validations        

@jlsherrill
Copy link
Member

I don't know that the changes need to be tested, but if you regenerate the api bindings you will see that code will likely need to be changed. for example, this method signature changes:

@@ -102,9 +102,12 @@ class ApiContentUnitSearchRequest(ModelNormal):
     ])

     @convert_js_args_to_python_args
-    def __init__(self, *args, **kwargs):  # noqa: E501
+    def __init__(self, search, *args, **kwargs):  # noqa: E501
         """ApiContentUnitSearchRequest - a model defined in OpenAPI

+        Args:
+            search (str): Search string to search content unit names
+

So if you are using the generated bindings its clearer that 'search' is required to be specified. This doesn't actually change the behavior of the API at all (hence why the tests all pass without generating the bindings)

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.

3 participants