Forum Discussion

marbenitez_fala's avatar
marbenitez_fala
Occasional Contributor
3 years ago
Solved

Error downloading resolved API

Hello I have an API that is valid (all checks ok) and when I try to download the resolved API I get this error without any other information "Cannot resolve invalid API definition, please fix any syntax issues.".

 

There are no external references or links.

 

 

  • HKosova's avatar
    HKosova
    3 years ago

    The problem is caused by the default value of the sellableFrom property in the SupplyLogisticSku and SupplyOffering schemas (lines 877 and 948):

            sellableFrom:
              type: string
              format: date-time
              example: "2021-01-05T05:25:20.279Z"
              default: "current time"     <-----------

    The "date-time" format is used for RFC 3339-style date-time values, and the string "current time" is not a valid date-time value. Removing this line will resolve the issue.

     

    Note that OpenAPI does not have a way to specify dynamic values for schema attributes. In other words, there is no way to define the default / minimum / maximum value as, say, "current time", "current year" or "today minus 10 years".

9 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Hi marbenitez_fala,

    Please open a support ticket and include a link to your API definition. Our support engineers will check what might be wrong. If your API is private, please also share it with swaggerhub-support.

    • marbenitez_fala's avatar
      marbenitez_fala
      Occasional Contributor
      Thanks, we will open the ticket, please guide me in sharing with swaggerhub-support.


      * Do I need to add swaggerhub-support as member?
      * When I try to add that name in the API I get this message: Invitation ErrorThe following account(s) are invalid and do not exist in the system: swaggerhub-support

      Thanks

      Descarga de Responsabilidad:
      Este mensaje contiene información confidencial y esta dirigido solamente al remitente especificado. Si usted no es el destinatario no debe tener acceso, distribuir ni copiar este e-mail. Notifique por favor al remitente inmediatamente si usted ha recibido este mensaje por error y eliminelo de su sistema. La transmisión del e-mail no se puede garantizar que sea segura, sin errores o como que la información podría ser interceptada, alterada, perdida, destruida, llegar atrasado, incompleto o contener virus, por lo tanto el remitente no acepta la responsabilidad por ningunos de los errores u omisiones en el contenido de este mensaje, que se presentan como resultado de la transmisión del e-mail. Si la verificación se requiere, por favor solicite una versión impresa.

      Disclaimer:
      This message contains confidential information and is intended only for recipient specified. If you are not recipient you should not disseminate, distribute or copy this e-mail. Please notify to sender immediately if you have received this message by mistake and delete this from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The receptor therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.