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

createObjects operation returns null updatedBy when using basic auth #87

Closed
pbolduc opened this issue Nov 23, 2022 · 1 comment
Closed

Comments

@pbolduc
Copy link
Contributor

pbolduc commented Nov 23, 2022

Describe the bug

When creating an object with basic auth, the updatedBy property comes back as null / nil. The description of this property says as much. However, on the DB-TimestampUserData object, these properties are marked as required. Since these properties are marked required, generated client library will generate not nullable Guid property in C#. The response cannot be deserialized.

Also, the createdBy's description says it should returned as null/nil as well. However, the value is returned as an empty Guid in this case.

[
   {
      "id":"af243f31-fb63-4799-8c6d-e8fe6a52387a",
      "fieldName":"anyKey",
      "mimeType":"text/plain",
      "originalName":"integration.test",
      "metadata":{
         
      },
      "path":"af243f31-fb63-4799-8c6d-e8fe6a52387a",
      "public":false,
      "createdBy":"00000000-0000-0000-0000-000000000000",
      "createdAt":"2022-11-23T23:29:17.410Z",
      "active":true,
      "updatedBy":null,
      "updatedAt":"2022-11-23T23:29:17.409Z",
      "$metadata":{
         "httpStatusCode":200,
         "extendedRequestId":"1963f566b7c1b56c3b16ee9d3763e8734da19f78403042f7fa7122ecdd6ea118",
         "attempts":1,
         "totalRetryDelay":0
      },
      "ETag":"\"4ae71336e44bf9bf79d2752e234818a5\"",
      "ServerSideEncryption":"AES256"
   }
]

I would also expect the createdAt to be less or equal to updatedAt. It appears the object is updated one millisecond before it was created.

To Reproduce

Steps to reproduce the behavior:

  1. Deploy service using BASIC AUTH
  2. Create a document
  3. View the response

Expected behavior

Since createdBy is set to Empty/Zero Guid, the updatedBy should be set the same way. Alternatively, these two properties should be nullable/not-required in the API specification.

Screenshots

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

@jujaga
Copy link
Member

jujaga commented Mar 15, 2023

We have dropped the required flags on the updatedBy and updatedAt attributes from the DB-TimestampUserData schema on the OpenAPI spec. Will be in v0.4.0.

@jujaga jujaga closed this as completed Mar 16, 2023
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

No branches or pull requests

2 participants