Support for Relative Documents With Embedded Schema Example in the OpenAPI Specification Plugin?

已回答

Dear all,
When I am writing OpenAPI specifications, I usually put large parts of the specification, especially component schemas, to separate files and reference the the parts I need via `$ref`.

Here is an example of file, containing only component schemas:

components:
headers:
ContentLanguage:
required: false
description: Describes the...
schema:
type: string
example: de-DE

This works quite fine, expect I don't have the same support in my IDE, like auto completion, for the files which contains only components.

Is there a way to tell Intellij, that it should treat this files also as OpenAPI specifications or as part of it?

Even in the OpenAPI Specification it is written, that a specification can be divided into multiple, connected parts at the discretion of the author.

1

Should work according to https://youtrack.jetbrains.com/issue/IDEA-251190#focus=Comments-27-4581796.0-0.

If it doesn't work, please file a bug at https://youtrack.jetbrains.com/newIssue?project=IDEA and attach the sample to reproduce it.

0

Hi Serge Baranov, I read the issue and if I understood the comments in the issue correctly, then it auto completion should be available in the referenced documents, even if the toplevel key in the YAML file is only components?

0

It looks like your specific request falls under https://youtrack.jetbrains.com/issue/IDEA-258264 which is not implemented yet.

0

This is very pity. As one of the commenters wrote, OpenAPI specifications can become quite huge, especially if they contain examples and documentation. So being able to have support in Intellij for splitting the specification into multiple files would be very good.

0

Maybe Nikita Katkov could also comment on this, as he is the assignee of the issue Serge Baranov mentioned?

0

Oliver, thank you for your request: this feature is planned to be implemented, please subscribe to the YT issue or vote it to be notified when it's completed. Also any ideas or wishes regarding feature look and feel would be highly appreciated - please leave them in the comments section

0

Hi Nikita Katkov, of course and with pleasure, as I really benefit from this feature.

0

Hi Nikita Katkov,

I added my thoughts on this issue to the story in your issue tracker. Can I somehow else support you? While working on an extremly large specification, I realised again how important this feature could be for some of us.

0

Hi, I had a look at 2021.3 EAP 4, but I didn't get what had improved. Is there a documentation on the changes done?

0

请先登录再写评论。