Forum Discussion

wz2b's avatar
New Contributor
2 years ago

Auto generating schemas for resources when I don't want it to

I have a question about swagger openapi 3.0.3.


I generate a bunch of resources like this:


$ref: './methods/customers/customerId/siteId/systemId/system.yaml'

which links to:


description: 'describe a system'
summary: 'describe a system'

description: 'system description'
$ref: "../../../../../schemas/SystemInfo.yaml"

which links to a schema whose actual contentents aren't very important.  What's important is that when the swagger output gets generated, I end up with two objects in the Schemas:

  • - One is named "SystemInfo" which is what I expect
  • - One is named just "system" but I didn't ask for this, it just appeared

Sometimes I'll have several paths/methods that return SystemInfo.  In that case, it makes SystemInfo, system, system_1, system_2, ... 


I can't figure out why it's doing this or how to inhibit it.  In what situations would a 'schema' object be automatically generated?






3 Replies