OpenAPI-Specifications icon indicating copy to clipboard operation
OpenAPI-Specifications copied to clipboard

"offlineAttributes" are not defined in both swagger files

Open tbolsh opened this issue 4 years ago • 8 comments

I was trying to generate a golang client using the go-swagger utility and it barks on both swagger files:

swagger generate client -f ../eSign-OpenAPI-Specification/esignature.rest.swagger-v2.1.json -A go-demo-client 2021/01/14 10:35:17 validating spec /Users/gcsadmin/projects/docusign-api/eSign-OpenAPI-Specification/esignature.rest.swagger-v2.1.json The swagger spec at "/Users/gcsadmin/projects/docusign-api/eSign-OpenAPI-Specification/esignature.rest.swagger-v2.1.json" is invalid against swagger specification 2.0. see errors :

  • some references could not be resolved in spec. First found: object has no key "offlineAttributes"

I have corrected files (the ones go-swagger validates) and if you want I can provide them to you as PR. Timofei Bolshakov, [email protected]

tbolsh avatar Jan 14 '21 19:01 tbolsh

That's the utility: https://github.com/go-swagger/go-swagger

tbolsh avatar Jan 14 '21 19:01 tbolsh

I can confirm the same problem, OfflineAttributes type is not defined in the specs.

image (Taken from Swagger Editor)

aymanbagabas avatar Jan 22 '21 19:01 aymanbagabas

I've just hit this too - that broken ref makes the spec currently unusable by most tools, since it's impossible to dereference. @RajRele @mmallis87 is it possible to get this fixed?

pimterry avatar Jan 29 '21 13:01 pimterry

Also ran into this

mjbarton712 avatar Feb 24 '22 17:02 mjbarton712

Have the same issue. Quite unfortunate :/

kolesnick avatar May 23 '22 14:05 kolesnick

Hello,

Recently I ran into this same issue when trying to generate a client for Elixir/OTP and my solution was to edit the swagger file locally and just remove this definition before generating the code. That didn't give me any trouble in the final application, so I assume this type is not currently used for anything.

Any update on this issue?

ghost avatar Jan 19 '23 18:01 ghost

Will be fixed in the next version (23.1.00.00) - Dev Center returned this to me (I forgot about this issue completely). I will create a PR today. Workaround: manually edit swagger file and insert following definition between "oauthAccess": and "page":

    "offlineAttributes": {
      "description": "Reserved for DocuSign use.",
      "type": "object",
      "properties": {
        "accountEsignId": {
          "description": "A GUID identifying the account associated with the consumer disclosure",
          "type": "string"
        },
        "deviceModel": {
          "description": "A string containing information about the model of the device used for offline signing.",
          "type": "string"
        },
        "deviceName": {
          "description": "A string containing information about the type of device used for offline signing.",
          "type": "string"
        },
        "gpsLatitude": {
          "description": "A string containing the latitude of the device location at the time of signing.",
          "type": "string"
        },
        "gpsLongitude": {
          "description": "A string containing the longitude of the device location at the time of signing.",
          "type": "string"
        },
        "offlineSigningHash": {
          "description": "",
          "type": "string"
        }
      }
    },

See the screenshot: Screenshot 2023-01-20 at 10 30 35 AM

tbolsh avatar Jan 20 '23 18:01 tbolsh

Offline Attributes are defined in esignature.rest.swagger-v2.1.json now. Tested after #72 was merged.

I haven't tried the other file.

nathany-copia avatar Mar 16 '23 18:03 nathany-copia