cancel
Showing results for 
Search instead for 
Did you mean: 

Error downloading resolved API

SOLVED
marbenitez_fala
Occasional Contributor

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
HKosova
Moderator

Re: Error downloading resolved API

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".


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

8 REPLIES 8
HKosova
Moderator

Re: Error downloading resolved API

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.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
marbenitez_fala
Occasional Contributor

Re: Error downloading resolved API

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.
HKosova
Moderator

Re: Error downloading resolved API

@marbenitez_fala please add "swaggerhub-support" as a collaborator to your API with View access, as explained here:

https://support.smartbear.com/swaggerhub/docs/collaboration/sharing-api.html

add-collaborator.png

 

 

There's no need to add this account to your organization - just share this one API with it.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
marbenitez_fala
Occasional Contributor

Re: Error downloading resolved API

when I try to add swaggerhub-support to the collaboration, I get this problem: Screenshot 2021-05-11_12-21-11-100.png

 

Do we have settings in our organization to allow external users?

Thanks

HKosova
Moderator

Re: Error downloading resolved API

@marbenitez_fala sorry, I (mistakenly) thought you were a SaaS user. The On-Premise version does not have the support user. Instead, please download the Unresolved API and any domains it uses and attach the files to your support ticket.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
marbenitez_fala
Occasional Contributor

Re: Error downloading resolved API

Attached is the yaml file inside a zip. Cannot attach yaml directly.

 

No external references are used. And that is the weird thing... Unresolved export works, but the resolved one does not... 😞 

HKosova
Moderator

Re: Error downloading resolved API

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".


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

marbenitez_fala
Occasional Contributor

Re: Error downloading resolved API

You have to admit is it not a useful message and it is not helping us find the problem. The validation is ok, the download unresolved works, but only the resolved makes those checks....

 

I would turn this into an improvement in the validations to give at least a hint of this problem.

 

Anyway, the problem is solved. I will take this into consideration.

 

Thank you very much, it has been quick and precise.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors