cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve info: data from swagger after generation...

SOLVED
New Contributor

Retrieve info: data from swagger after generation...

At the top of my swagger, I have the following:

 

swagger: '2.0'
info:
  title: TEST API
  description: Developer API for testing purposes
  version: "1.0.7"
  x-last-updated: "2018-12-26T14:40:08+00:00"


Once I use this swagger to generate my server (golang), I need to be able to retrieve the version and/or x-last-updated field.  Is this information carried over to the generated code somewhere that I'm able to retrieve it, or does it always just reside in the swagger file itself and not used during the generation process?

1 ACCEPTED SOLUTION

Accepted Solutions
New Contributor

Re: Retrieve info: data from swagger after generation...

Nvm... found a way.  The RAW swagger in JSON format is saved in the generated server.  I can grab it from there...

2 REPLIES 2
New Contributor

Re: Retrieve info: data from swagger after generation...

Nvm... found a way.  The RAW swagger in JSON format is saved in the generated server.  I can grab it from there...

Community Manager

Re: Retrieve info: data from swagger after generation...

Thanks for sharing the solution you've found! This will help other community members who may face a similar issue.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2
Top Kudoed Authors