-
Notifications
You must be signed in to change notification settings - Fork 270
Description
Inline local works, but in the process you lose the name of the component and therefore passing this code generator will end up generating a different type for every usage. It should be useful for scenarios like Power Platform though.
Inline external will pull in components from external files. However, if those components have local references in the external file, those local references don't get brought into the inlined file. Merging of components during writing seems like a bad approach. Having the writer render a reference either as a $ref or as the complete object seemed fairly harmless for a writer as it did not change the semantics of the document significantly. However, merging components is a much bigger task. e.g. What if there is a naming conflict?
In v2 of OpenAPI.NET reference objects and target components are going to be distinct concepts and therefore changing which will be rendered on the fly is going to be too much responsibility for the writer. I suspect the alternative will be to use a visitor to inline references. This will establish the precedent of inlining being a mutation to the document. At that point we can do things like merge the components of external files.
In the meanwhile, if you want to inline external files successfully, you will need to inlineLocal and inlineExternal.