Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][csharp] Twitter Open API does not compile - Missing AnyType and BaseValidate #7458

Open
4 of 5 tasks
linvi opened this issue Sep 20, 2020 · 10 comments
Open
4 of 5 tasks

Comments

@linvi
Copy link

linvi commented Sep 20, 2020

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
Description

When building from the official Twitter open api (https://api.twitter.com/labs/2/openapi.json and postman) in csharp, the generation completes with some warnings and building the project fails.

The project mainly contains 2 issues:

  • AnyType is missing
  • BaseValidate method is used but is sometimes not defined.
openapi-generator version

4.3.1

OpenAPI declaration file content or url

https://api.twitter.com/labs/2/openapi.json

Generation Details
openapi-generator generate -i twitter-v2-open-api.json -g csharp-netcore
openapi-generator logs (click to expand)
[main] INFO  o.o.codegen.DefaultGenerator - Generating with dryRun=false
[main] INFO  o.o.codegen.DefaultGenerator - OpenAPI Generator: csharp-netcore (client)
[main] INFO  o.o.codegen.DefaultGenerator - Generator 'csharp-netcore' is considered stable.
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] INFO  o.o.c.l.AbstractCSharpCodegen - Environment variable CSHARP_POST_PROCESS_FILE not defined so the C# code may not be properly formatted by uncrustify (0.66 or later) or other code formatter. To define it, try `export CSHARP_POST_PROCESS_FILE="/usr/local/bin/uncrustify --no-backup" && export UNCRUSTIFY_CONFIG=/path/to/uncrustify-rules.cfg` (Linux/Mac). Note: replace /path/to with the location of uncrustify-rules.cfg
[main] INFO  o.o.c.l.AbstractCSharpCodegen - NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI).
[main] INFO  o.o.c.languages.CSharpClientCodegen - Generating code for .NET Framework netstandard2.0
[main] INFO  o.o.codegen.DefaultGenerator - Model Position not generated since it's an alias to array (without property) and `generateAliasAsModel` is set to false (default)
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.codegen.utils.ModelUtils - [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
[main] WARN  o.o.c.l.AbstractCSharpCodegen - 4.3.0 has deprecated the use of vendor extensions which don't follow lower-kebab casing standards with x- prefix.
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/AnimatedGif.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/AnimatedGifTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/AnimatedGif.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/CashtagEntity.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/CashtagEntityTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/CashtagEntity.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/CashtagFields.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/CashtagFieldsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/CashtagFields.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/ClientForbiddenProblem.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/ClientForbiddenProblemTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/ClientForbiddenProblem.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/CommonMediaFields.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/CommonMediaFieldsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/CommonMediaFields.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/ContextAnnotation.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/ContextAnnotationTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/ContextAnnotation.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/ContextAnnotationDomainFields.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/ContextAnnotationDomainFieldsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/ContextAnnotationDomainFields.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/ContextAnnotationEntityFields.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/ContextAnnotationEntityFieldsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/ContextAnnotationEntityFields.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/DisallowedResourceProblem.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/DisallowedResourceProblemTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/DisallowedResourceProblem.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/EntityIndices.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/EntityIndicesTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/EntityIndices.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/Error.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/ErrorTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/Error.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/Expansions.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/ExpansionsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/Expansions.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/FullTextEntities.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/FullTextEntitiesTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/FullTextEntities.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/GenericProblem.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/GenericProblemTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/GenericProblem.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/Geo.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/GeoTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/Geo.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/HashtagEntity.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/HashtagEntityTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/HashtagEntity.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/HashtagFields.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/HashtagFieldsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/HashtagFields.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/InlineObject.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/InlineObjectTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/InlineObject.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/InlineResponse200.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/InlineResponse200Tests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/InlineResponse200.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/InlineResponse200Data.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/InlineResponse200DataTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/InlineResponse200Data.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/InvalidRequestProblem.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/InvalidRequestProblemTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/InvalidRequestProblem.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/Media.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/MediaTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/Media.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/MentionEntity.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/MentionEntityTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/MentionEntity.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/MentionFields.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/MentionFieldsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/MentionFields.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/Photo.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/PhotoTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/Photo.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/Place.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/PlaceTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/Place.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/PlaceType.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/PlaceTypeTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/PlaceType.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/Point.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/PointTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/Point.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/Poll.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/PollTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/Poll.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/PollOption.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/PollOptionTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/PollOption.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/Problem.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/ProblemTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/Problem.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/ProblemFields.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/ProblemFieldsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/ProblemFields.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/ResourceNotFoundProblem.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/ResourceNotFoundProblemTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/ResourceNotFoundProblem.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/ResourceUnauthorizedProblem.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/ResourceUnauthorizedProblemTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/ResourceUnauthorizedProblem.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/SingleTweetLookupResponse.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/SingleTweetLookupResponseTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/SingleTweetLookupResponse.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/SingleUserLookupResponse.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/SingleUserLookupResponseTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/SingleUserLookupResponse.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/Tweet.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/TweetTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/Tweet.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/TweetAttachments.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/TweetAttachmentsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/TweetAttachments.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/TweetGeo.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/TweetGeoTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/TweetGeo.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/TweetLookupResponse.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/TweetLookupResponseTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/TweetLookupResponse.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/TweetNonPublicMetrics.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/TweetNonPublicMetricsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/TweetNonPublicMetrics.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/TweetOrganicMetrics.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/TweetOrganicMetricsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/TweetOrganicMetrics.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/TweetPromotedMetrics.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/TweetPromotedMetricsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/TweetPromotedMetrics.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/TweetPublicMetrics.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/TweetPublicMetricsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/TweetPublicMetrics.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/TweetReferencedTweets.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/TweetReferencedTweetsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/TweetReferencedTweets.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/TweetSearchResponse.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/TweetSearchResponseTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/TweetSearchResponse.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/TweetSearchResponseMeta.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/TweetSearchResponseMetaTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/TweetSearchResponseMeta.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/TweetWithheld.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/TweetWithheldTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/TweetWithheld.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/URLFields.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/URLFieldsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/URLFields.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/URLImage.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/URLImageTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/URLImage.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/UnsupportedAuthenticationProblem.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/UnsupportedAuthenticationProblemTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/UnsupportedAuthenticationProblem.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/UrlEntity.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/UrlEntityTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/UrlEntity.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/UsageCapExceededProblem.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/UsageCapExceededProblemTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/UsageCapExceededProblem.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/User.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/UserTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/User.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/UserEntities.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/UserEntitiesTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/UserEntities.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/UserEntitiesUrl.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/UserEntitiesUrlTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/UserEntitiesUrl.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/UserLookupResponse.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/UserLookupResponseTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/UserLookupResponse.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/UserPublicMetrics.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/UserPublicMetricsTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/UserPublicMetrics.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/UserWithheld.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/UserWithheldTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/UserWithheld.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Model/Video.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Model/VideoTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/Video.md
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] WARN  o.o.codegen.utils.ModelUtils - Multiple schemas found in the OAS 'content' section, returning only the first one (application/json)
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Api/GeneralApi.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Api/GeneralApiTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/GeneralApi.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Api/SearchApi.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Api/SearchApiTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/SearchApi.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Api/TweetsApi.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Api/TweetsApiTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/TweetsApi.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Api/UsersApi.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Api/UsersApiTests.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./docs/UsersApi.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/IApiAccessor.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/Configuration.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/ApiClient.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/ApiException.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/ApiResponse.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/ExceptionFactory.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/ClientUtils.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/HttpMethod.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/IAsynchronousClient.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/ISynchronousClient.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/RequestOptions.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/Multimap.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools//project.json
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/IReadableConfiguration.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Client/GlobalConfiguration.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./README.md
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./git_push.sh
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./.gitignore
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Properties/AssemblyInfo.cs
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./Org.OpenAPITools.sln
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools/Org.OpenAPITools.csproj
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
[main] INFO  o.o.codegen.AbstractGenerator - writing file ./.openapi-generator/VERSION
dotnet build logs (click to expand)
Microsoft (R) Build Engine version 16.7.0+7fb82e5b2 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
Model/DisallowedResourceProblem.cs(52,26): warning CS0108: 'DisallowedResourceProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/ClientForbiddenProblem.cs(52,26): warning CS0108: 'ClientForbiddenProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/InvalidRequestProblem.cs(52,26): warning CS0108: 'InvalidRequestProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/UsageCapExceededProblem.cs(52,26): warning CS0108: 'UsageCapExceededProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/GenericProblem.cs(52,26): warning CS0108: 'GenericProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/ResourceNotFoundProblem.cs(119,16): error CS0246: The type or namespace name 'AnyType' could not be found (are you missing a using directive or an assembly reference?) [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/ResourceNotFoundProblem.cs(52,26): warning CS0108: 'ResourceNotFoundProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/ResourceNotFoundProblem.cs(98,114): error CS0246: The type or namespace name 'AnyType' could not be found (are you missing a using directive or an assembly reference?) [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/ResourceNotFoundProblem.cs(98,138): error CS0246: The type or namespace name 'AnyType' could not be found (are you missing a using directive or an assembly reference?) [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/UnsupportedAuthenticationProblem.cs(52,26): warning CS0108: 'UnsupportedAuthenticationProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/ResourceUnauthorizedProblem.cs(52,26): warning CS0108: 'ResourceUnauthorizedProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]

Build FAILED.

Model/DisallowedResourceProblem.cs(52,26): warning CS0108: 'DisallowedResourceProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/ClientForbiddenProblem.cs(52,26): warning CS0108: 'ClientForbiddenProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/InvalidRequestProblem.cs(52,26): warning CS0108: 'InvalidRequestProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/UsageCapExceededProblem.cs(52,26): warning CS0108: 'UsageCapExceededProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/GenericProblem.cs(52,26): warning CS0108: 'GenericProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/ResourceNotFoundProblem.cs(52,26): warning CS0108: 'ResourceNotFoundProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/UnsupportedAuthenticationProblem.cs(52,26): warning CS0108: 'UnsupportedAuthenticationProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/ResourceUnauthorizedProblem.cs(52,26): warning CS0108: 'ResourceUnauthorizedProblem.Type' hides inherited member 'ProblemFields.Type'. Use the new keyword if hiding was intended. [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/ResourceNotFoundProblem.cs(119,16): error CS0246: The type or namespace name 'AnyType' could not be found (are you missing a using directive or an assembly reference?) [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/ResourceNotFoundProblem.cs(98,114): error CS0246: The type or namespace name 'AnyType' could not be found (are you missing a using directive or an assembly reference?) [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
Model/ResourceNotFoundProblem.cs(98,138): error CS0246: The type or namespace name 'AnyType' could not be found (are you missing a using directive or an assembly reference?) [/Users/linvi/dev/tweetinvi/src/TwitterOpenAPI/src/Org.OpenAPITools/Org.OpenAPITools.csproj]
    8 Warning(s)
    3 Error(s)

Time Elapsed 00:00:02.04
Steps to reproduce
curl https://api.twitter.com/labs/2/openapi.json --output twitter-v2-open-api.json
openapi-generator generate -i twitter-v2-open-api.json -g csharp-netcore
cd src/Org.OpenAPITools
dotnet restore
dotnet build
Related issues/PRs
Suggest a fix
@auto-labeler
Copy link

auto-labeler bot commented Sep 20, 2020

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@ericvanderwal
Copy link

I am also looking for this. Thank you.

@linvi
Copy link
Author

linvi commented Sep 21, 2020

@dumbgamedev I have changed the generated code to prevent the issue from happening again. But there are many different issues with the generated models and logic.

I am the developer of Tweetinvi a .NET library to access Twitter. I have taken the decision to write the models myself until the open api generator can better support the complex schema of Twitter.

Tonight I will push a first code change that will allow you to access the User and Tweet endpoints on Tweetinvi 6.0 branch.

I hope this helps you.

Cheers!

@felschr
Copy link

felschr commented Oct 27, 2020

Any plans for fixing this? Perhaps it would be fine for now to remove/uncomment the method call?

@wing328
Copy link
Member

wing328 commented Oct 27, 2020

Can you give the latest master a try, which should have the AnyType issue fixed in the csharp-netcore client generator?

@felschr
Copy link

felschr commented Oct 27, 2020

I did try this with openapi-generator-cli-5.0.0-20201026.051158-829.jar.
I don't see issues for AnyType but I do get the BaseValidate errors.

@wing328
Copy link
Member

wing328 commented Oct 27, 2020

Do you mind elaborating on the BaseValidate errors? A screen cap or error message would help.

@felschr
Copy link

felschr commented Oct 27, 2020

Model/RecommendationRequest.cs(158,30): error CS0103: The name 'BaseValidate' does not exist in the current context [/home/felschr/dev/work/projectname/common/api/csharp/combined/src/ProjectName.Api/ProjectName.Api.csproj]

This is the relevant code in the RecommendationRequest.cs:

        IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            foreach(var x in BaseValidate(validationContext)) yield return x;
            yield break;
        }

Some people just removed the affected parts from their generated code to work around the issue:
TheSMSWorks/smsw-csharp-sdk@3dd6770#diff-4f7add344306f8b565f22eb48c5ddb3464aa90dfc084cf7bcb5887e256a90e56L167

@dlumpp
Copy link

dlumpp commented Jan 21, 2021

There is more detail about the problem and a proposed fix in the swagger-codegen repo in issue 7669.

The root of the problem seems to be that Dictionary isn't treated as a system type.

@smargoli2
Copy link

Please merge PR #7669!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants