cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

The Hub is now in read-only mode as we make improvements to the Hub experience. More information is available here.

Generating API using Swagger ignores allOf when generating model objects

antokne
Mt. Kenya

Hi,

I'm running the command:

swagger-codegen generate -i https://developers.strava.com/swagger/swagger.json -l swift5

The DetailedActivity does not contain any of the SummaryActivity as described by the allOf section in https://developers.strava.com/swagger/activity.json#/DetailedActivity.

I've tried using version 3.0.41 and 2.4.30

A quick search indicated that it is a swagger bug?

Am I missing something here?

Thanks Antz

1 REPLY 1

antokne
Mt. Kenya

I also tried using openapi generator, but had to specify the skip validate spec parameter as validation fails 

 

Errors: 
-attribute paths.'/routes/{id}/export_gpx'(get).responses.200.content is unexpected
-attribute paths.'/routes/{id}/export_tcx'(get).responses.200.content is unexpected

The DetailedActivity generated looked better but it also generated a DetailsActivityAllOf one too.

Ready, Get Set, Go!

Welcome to the Community - here is your guide to help you get started!


Know how to use Community


Understand Community Settings