RefPathToObjName returns the name of referenced object without changes. #/components/schemas/Foo -> Foo #/components/parameters/Bar -> Bar #/components/responses/baz_baz -> baz_baz document.json#/Foo -> Foo http://deepmap.com/schemas/document.json#/objObj -> objObj Does not check refPath corr
(refPath string)
| 423 | // |
| 424 | // Does not check refPath correctness. |
| 425 | func RefPathToObjName(refPath string) string { |
| 426 | parts := strings.Split(refPath, "/") |
| 427 | if len(parts) > 0 { |
| 428 | return parts[len(parts)-1] |
| 429 | } |
| 430 | return "" |
| 431 | } |
| 432 | |
| 433 | // RefPathToGoType takes a $ref value and converts it to a Go typename. |
| 434 | // #/components/schemas/Foo -> Foo |
no outgoing calls