Skip to content

[BUG][Windows] Missing generated output #19708

@devhl-labs

Description

@devhl-labs

edit-see my next comment for a better description of the issue

In the api, I see the {{classname}} like ApiKeysApi, but in a supporting file, the {{classname}} is like APIKeysApi. This is one of the issues being seen by #19626, posting here to narrow down the scope and provide a simplified spec. The files that are relevant are APIKeysApi.cs and HostConfiguration.cs

{{#apiInfo}}
{{#apis}}
{{#operations}}
{{#operation}}
{{classname}} -> casing is wrong
{{/operation}}
{{/operations}}
{{/apis}}
{{/apiInfo}}

{
    "info": {
        "title": "Files.com API",
        "contact": {
            "name": "Files.com Customer Success Team",
            "email": "support@files.com"
        },
        "version": "0.0.1"
    },
    "swagger": "2.0",
    "produces": [
        "application/json",
        "application/msgpack",
        "application/xml"
    ],
    "securityDefinitions": {
        "api_key": {
            "type": "apiKey",
            "description": "API Key - supports user-based or site-wide API keys",
            "name": "XFilesAPIKey",
            "in": "header"
        }
    },
    "host": "app.files.com",
    "basePath": "/api/rest/v1",
    "tags": [
        {
            "name": "api_key",
            "description": "Operations about api_keys"
        },
        {
            "name": "API Keys",
            "description": "Operations about API Keys"
        }
    ],
    "paths": {
        "/api_keys/{id}": {
            "get": {
                "summary": "Show API Key",
                "description": "Show API Key",
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "in": "path",
                        "name": "id",
                        "description": "Api Key ID.",
                        "type": "integer",
                        "format": "int32",
                        "required": true,
                        "x-ms-summary": "Api Key ID."
                    }
                ],
                "responses": {
                    "400": {
                        "description": "Bad Request",
                        "x-ms-summary": "Bad Request"
                    }
                },
                "tags": [
                    "api_keys",
                    "API Keys"
                ],
                "operationId": "GetApiKeysId",
                "x-authentication": [
                    "self_managed"
                ],
                "x-category": [
                    "developers"
                ]
            }
        }
    }
    ,
    "definitions": {
    }
}

generate -c "path\config.json" --skip-validate-spec

{
  "apiName": "FilesComClient",
  "generatorName": "csharp",
  "library": "generichost",
  "netCoreProjectFile": true,
  "nullableReferenceTypes": true,
  "optionalAssemblyInfo": true,
  "packageName": "FilesCom",
  "targetFramework": "net8.0",
  "sourceFolder": "src",
  "optionalProjectFile": "FilesCom",
  "inputSpec": "path\\spec.json",
  "outputDir": "path\\generated"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions