OpenAPITools / OpenAPITools/openapi-generator

Declared path parameter functionId needs to be defined as a path parameter in path or operation level

Open
#18,339 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

PS D:\DEV\talq> docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate -i /local/talq-api-cms-2-6-0-online.json -g html2 -o /local/talq-api-cms-html2
Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
 | Error count: 2, Warning count: 0
Errors:
        -paths.'/devices/{deviceAddress}/{functionId}/{attributeName}'. Declared path parameter functionId needs to be defined as a path parameter in path or operation level
        -paths.'/devices/{deviceAddress}/{functionId}/{attributeName}'. Declared path parameter attributeName needs to be defined as a path parameter in path or operation level

        at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:717)
        at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:744)
        at org.openapitools.codegen.cmd.Generate.execute(Generate.java:527)
        at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
        at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
PS D:\DEV\talq> 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the shown openapi-generator-cli command and input specification. Start at CodegenConfigurator.java and the Generate/OpenAPIGenerator entry points named in the stack trace, then trace validation for the functionId and attributeName path parameters. Done requires establishing the expected validation behavior and a confirmed resolution, but the issue does not state the intended change.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
api, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.