-
Notifications
You must be signed in to change notification settings - Fork 31
Can't export to new RAML/YAML files #22
Comments
Hi Chris. We can't easy extend BaseModel from YAMLObject. In this case I got TypeError: Best regards, On Tue, Jul 14, 2015 at 9:02 AM, Chris Petersen [email protected]
Andrew Degtyarev |
@ex-nerd I'm also trying to flatten some RAML files like you and I found this issue. It has been a while, do you have any update on if you were able to achieve this, using this parser or anything else? |
@solarkennedy sorry, my company's doc generation standardized on Swagger so all of my RAML work got put on pause. |
Gotcha. This could be considered closed if the scope of this project is not intended to include raml dumping, only raml parsing. For my particular needs I ended up using a node based API spec converter to go "from" RAML "to" RAML which created a consolidated file for me. |
I tried to use this today to flatten out some RAML files (so I could import them into postman) and discovered that the pyraml models don't re-encode cleanly. Using a simple script like this one:
... elements encode using a variety of non-generic types like:
!!python/object:pyraml.entities.RamlTrait
!!python/object:pyraml.entities.RamlResource
!!python/object:pyraml.entities.RamlMethod
!!python/unicode
(for embedded JSON schemas)And so forth.
I haven't yet tested this but it looks like fixing some of these might be as easy as extending
BaseModel
fromyaml.YAMLObject
instead of plainobject
.Is this something you'd be open to having fixed (even if it means creating a
pyraml.parser.dump(p)
type method)? If so, I can keep poking at it.The text was updated successfully, but these errors were encountered: