vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

bug: it doesnt recognise the serverless variables whilst on serverless framework it shows as it should be

Open Viki-Robles opened this issue 2 years ago • 4 comments

Based on the Serverless Framework docs the schema should look like this but I get errors from the source till the end.


events:
      - cloudwatchEvent:
          name: ${self:custom.transcribeJobName.${self:provider.stage}}
          event:
            source:
              - 'aws.transcribe'
            detail-type:
              - 'Transcribe Job State Change'
            detail:
              TranscriptionJobStatus:
                - COMPLETED
                - FAILED

Viki-Robles avatar Feb 15 '22 11:02 Viki-Robles

Maybe related to #698

Shereef avatar Feb 16 '22 14:02 Shereef

This extension provides generic YAML support and It is very hard for us to assess issues on many different schemas and usages. Can you provide a more complete example that demonstrates the issue? Something with the filenames and the content for those files would be appreciated.

gorkem avatar Feb 19 '22 20:02 gorkem

vpc: ${self:custom.vpc.${opt:stage, 'dev'}} will cause error Incorrect type. Expected "Aws.Vpc". when validating serverless.yml. Perhaps a fix to this will be to modify schema for arrays and objects to allow strings starting with ${ eg:

properties:
  vpc:
    anyOf:
    - type: string
      pattern: "^\\s*\\${.+}\\s*$"
    - type: object

ErnstStavroBlofeld avatar May 01 '22 14:05 ErnstStavroBlofeld

same thing happens to me when linking yml files dynamically image

cvargas-xbrein avatar Sep 06 '23 19:09 cvargas-xbrein