question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Per-language directive not being applied.

See original GitHub issue

Describe the bug Using a directive per-language is not being applied, as documented here: http://azure.github.io/autorest/user/literate-file-formats/configuration.html#directives---global-or-per-language

Autorest version 3.0.6339 – (3.1.* errors out for me, opening a different issue).

Input yaml config: Does not work (wrapped in a $(csharp) condition):

csharp:
  directive:
    - where: "$.definitions.*.properties.properties"
      transform: >-
        $["x-ms-client-flatten"] = false;
        return $;

Works:

directive:
  - where: "$.definitions.*.properties.properties"
    transform: >-
      $["x-ms-client-flatten"] = false;
      return $;

Expected behavior The directive is applied when generating CSharp code.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jviaucommented, Apr 13, 2021

Ah understood! I worked around it by splitting to calling autorest per language independently. Which is acceptable for us for now.

I have a satisfactory workaround - it is okay with me if this issue is closed. Thank you for the info!

0reactions
timotheeguerincommented, Apr 13, 2021

I don’t think this is possible with autorest v3 if you want to build multiple languages in parallel.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 6 numberonly directive not working - Stack Overflow
When you are using custom directive/pipe in a shared module, you need to exports it also. Basically in your tutorial, he created the ......
Read more >
Directives not working but there's no error in console - ionic-v3
my ionic info: @ionic/cli-utils : 1.4.0 Cordova CLI : 7.0.1 Ionic CLI : 3.4.0 The issue is that I created a directive with...
Read more >
Angular Directive Tutorial With Example | Custom Directives
Attribute Directive is basically used to modify or alter the ... It does not require brackets or parentheses like attribute directive.
Read more >
User and Workspace Settings - Visual Studio Code
When you search using the Search bar, it will not only show and highlight ... There is a Commonly Used group at the...
Read more >
directives assigned to component are not working in angular 9 ...
IN angular 9, my custom directives are not getting added to component properly. I have used “queries” property to map directives to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found