Closed dquenne closed 5 years ago
ah singletons shouldn't require an id attr at all. looks like a bug on my part
did the tests still run? let me check because i have a singleton test
this currently fails on parent singletons that have no ids.
e.g. change the example in models/singleton to:
singleton asset-resource Resource { name: string
/operations
PUT GET
}
can fix?
Took a stab at reworking genswagger.ts a bit to have special logic around subresources of singleton resources. Lmk what you think.
Updated the singleton resource examples (and expected parsed.expected
and swagger.expected
) to produce the following routes:
Seems like this is the intended behavior anyway, but assigning
idType
outside theif (!singleton)
clause meant it was still required for singleton resources. Lmk if I'm missing some context here, but this seems to work for me.