Skip to content

Where are schemas being generated. #5100

@jakyle

Description

@jakyle

Q&A (please complete the following information)

  • OS: Windows 10
  • Browser: Chrome
  • Version: 2.something? whatever swashbuckle 4.1 uses
  • Method of installation: packaged with swashbuckle
  • Swagger-UI version: [e.g. 3.10.0]
  • Swagger/OpenAPI version: OpenAPI 3.0

Content & configuration

Swagger-UI configuration options:

SwaggerUI({
        var configObject = JSON.parse('%(ConfigObject)');
        var oauthConfigObject = JSON.parse('%(OAuthConfigObject)');
        // Apply mandatory parameters
        configObject.dom_id = "#swagger-ui";
        configObject.presets = [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset];
        configObject.layout = "StandaloneLayout";
})

How can we help?

I am trying to create a plugin that will, in a hack-ey way, probably ignoring the current open API 3.0 spec, create a poly-morphic array of objects. when the json is sent to swagger-ui, it is parsed down in to the "spec" object. what I want to know where exactly are the "schema" objects for each "definitions" being generated from the spec object. for example this is a snippet from my json.

income collection one

and the actual reference.

array 2

so what I'm expecting is that when the schema object is created, which from what I understand is the object that will be displayed in the ui, will contain the description from the property level and the rest of the information in the actual reference. what I end up with while debugging is something like this...

array polly debug

this is a snippet from the model component in the render method for schema.

modelcompdebug

so for whatever schema is being passed into the model, I want to know where I can override the schema generating behavior for my plugin. I am having a doozy of a time finding this for some reason. thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions