kontent-ai / model-generator-net

Kontent.ai .NET model generator.
https://www.nuget.org/packages/Kontent.Ai.ModelGenerator
MIT License
17 stars 19 forks source link

KontentModelGenerator returns error #189

Closed jrex-hw closed 9 months ago

jrex-hw commented 9 months ago

Brief bug description

When attempting to run the KontentModelGenerator (in both local .net tool and stand alone) I receive the following error: Models were generated for delivery-sdk-net version 17.5.0 No content type available for the project ([MyProjectId]). Please make sure you have the Delivery API enabled at https://app.kontent.ai/. When i used the Postman Collection with my projectId and my DeliverApi Key to request: https://deliver.kontent.ai/:environment_id/types?skip=0&limit=10 the Postman request returns my expected content types.

What went wrong? Error was received and no content models were created.

Repro steps

  1. Installed KontentModelGenerator into my project (followed directions in repos) (My project is an Azure Function but I have also tried it in a .net6 Console application and both return the same response)
  2. Run the following command from the Package Manager Console (in VS 2022) KontentModelGenerator --projectid "[MyProjectId]" --namespace "Test.Models.ContentTypes" --apikey "[DeliverApiKey]"
  3. Wait for command to run
  4. Error is returned in the Package Manager Console

Expected behavior

Content Models are created What is the correct behavior? I would expect the command to run and my content models created in my project.

Test environment

Additional context

Add any other context about the problem here.

Screenshots

Add links to screenshots, if possible.

jrex-hw commented 9 months ago

i was able to finally get the standalone version to work.