question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[develop 2.0] support allOf in models

See original GitHub issue

Currently the 2.0 spec supports allOf constructs but the js library does not.

https://github.com/swagger-api/swagger-ui/issues/723

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:28 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
whitlockjccommented, May 4, 2015

We could definitely make this work but we need to figure out the best way to display this stuff. If we could agree on that, we’d be able to do the work.

0reactions
dcinadrcommented, Jan 28, 2017

This is still not working but I have found a fix that can be added to the source code. If you place this code in between lines 491 and 492 of the signature.js file it will fix the issue.

_.forEach(schema.properties, function(property, name){ model.definition.properties[name] = property; });

Read more comments on GitHub >

github_iconTop Results From Across the Web

oneOf, anyOf, allOf, not - Swagger
allOf. OpenAPI lets you combine and extend model definitions using the allOf keyword. allOf takes an array of object definitions that are used...
Read more >
Define array of multiple models in Swagger 2.0 - Stack Overflow
Swagger/OpenAPI 2.0 does not support multiple types for items , but there are a ... Inherit the BBANDS and DEMA models from Indicator...
Read more >
Support for oneOf, anyOf and allOf - Liferay Help Center
With allOf you can use the power of composition to create an entity that combines several others. It's the most potent way of...
Read more >
Additional properties not allowed: oneOf
Hi everyone ! It's been few days that I'm trying to create a "clean" configuration with swagger, but swagger-cli doesn't validate some of....
Read more >
OpenAPI Specification
null is not supported as a type (see nullable for an alternative solution). Models are defined using the Schema Object, which is an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found