profile
viewpoint
Johannes Wienke languitar Plan.One Germany http://www.semipol.de If I am not programming, I am a photographer: https://www.johanneswienke.de

languitar/autosuspend 50

A daemon to automatically suspend and wake up a system

corlab/dslzoo 7

Robotics DSL Zoo

corlab/homebrew-formulas 3

homebrew-formulas

corlab/Neo4jCypher 3

Neo4j Cypher DSL implementation in MPS

corlab/universal_robot 1

ROS-Industrial universal robot meta-package. http://ros.org/wiki/universal_robot

languitar/broadcast-logging 1

A Python logging system handler which broadcasts log messages and a matching receiver executable.

languitar/config-nvim 1

Neovim-only dot files

corlab/fleximon-cm-prototypes 0

FlexiMon Condition Monitoring -- Experimental Code

corlab/fleximon-robotics 0

Robot program for FlexiMon

corlab/fleximon-rsb-matlab 0

RSB Matlab with FlexiMon Extensions

issue commentpython-pillow/Pillow

Can't identify TIF with mode=CMYK

I was just hit by the same issue. Would the fix in https://github.com/neerajthakur11/Pillow/commit/922994431ba4ce8d4153c05275b3ddc3f27c03b0 be enough to get support for this format?

talebbits

comment created time in 3 hours

push eventlanguitar/config-nvim

Johannes Wienke

commit sha 48fb0845a3440ae3e110f1a88b2ac64ffd733b48

Adapt to changed nvim-tree options

view details

push time in 6 days

issue commentkubernetes/autoscaler

CA failed to load Instance Type list at AWS ap-northeast-3 (Osaka) region

Just to confirm, are all 3 of you only seeing this in Osaka, with a v1.21.1 tag?

Does running this with the flag --aws-use-static-instance-list=true still produce this behaviour?

Our stacktrace looked the same but was caused by a permission problem. So we're luckily not affected by this exact issue.

adaam

comment created time in 10 days

issue commentkubernetes/autoscaler

CA failed to load Instance Type list at AWS ap-northeast-3 (Osaka) region

Is there a known workaround for this? Seems that we're hit by the same issue.

adaam

comment created time in 10 days

issue closedlanguitar/autosuspend

autosuspend suspends Ubuntu 20.04 on startup on dual-boot system

I have a dual-boot system with both Windows 10 and Ubuntu. Each OS uses a different way of storing the time in the machine. Linux uses UTC, and Windows uses the local time-zone, which is US Pacific Time for me.

Ubuntu sets the time sometime during startup. I have set Windows up to do the same. When switching back and forth between the two, an interesting issue happens. Specifically, when I boot Windows, then boot to Ubuntu (20.04.3), autosuspend nearly instantly suspends the machine. If I reboot Ubuntu one more time, with the time already being correct from the start of the boot process, everything behaves as intended - no instant suspend.

I think there is some sort of race condition between ntp and autosuspend services on Linux. This is not just merely an inconvenience to have to restart the machine right away, it also wears out the 8 old fashioned 14TB SATA hard disks, since the machine acts mainly as a NAS.

The simplest solution is probably to figure out a way to ensure autosuspend runs after ntp. It looks like the timesyncd service is the issue. I'm not certain how to accomplish this in systemd given the many Ubuntu targets.

A better solution would be to perhaps also take a look at the hardware monotonic clock, and figure out when a big shift has happened in the clock due to a time synchronization happened, while autosuspend was already running, and take appropriate action.

closed time in 11 days

madbrain76

issue commentlanguitar/autosuspend

autosuspend suspends Ubuntu 20.04 on startup on dual-boot system

I'll close this issue for now. If there's still a problem, please reopen the issue.

madbrain76

comment created time in 11 days

push eventlanguitar/config-nvim

Johannes Wienke

commit sha 190f4e5d5ba955ce3b19e127e4851cfc29950c50

Use new nvim-cmp options property

view details

push time in 11 days

issue commentlanguitar/autosuspend

autosuspend suspends Ubuntu 20.04 on startup on dual-boot system

I would expect that there are several services that can be confused by big time jumps. NTP usually tries to avoid big shifts and uses gradual fixes, but that's probably not feasible for such big differences

I think the easiest solution to your problem is to instruct Windows to use UTC for the hardware clock, too. That works pretty well: https://www.howtogeek.com/323390/how-to-fix-windows-and-linux-showing-different-times-when-dual-booting/

madbrain76

comment created time in 12 days

issue commentswaywm/swaylock

Doesn't unlock after I typed the correct password

Same thing here. Happens randomly. Has anyone in the meantime found out what is wrong here?

eternal-sorrow

comment created time in 15 days

issue commentquarkusio/quarkus

Kotlin no-arg/jpa compiler plugin ignored when recompiling in continuous testing mode

Thank you for the explanations! We'll try that.

languitar

comment created time in 21 days

issue commentquarkusio/quarkus

Kotlin no-arg/jpa compiler plugin ignored when recompiling in continuous testing mode

So, as there already is something like the jpa preset in the code, that doesn't trigger because the no-arg plugin is not in the compiler plugin list? Or what is the bug here?

languitar

comment created time in 21 days

issue commenthaiwen/seafile

Upgrade from 6.2.5 to 6.3.2 fails with missing table notifications_notification

Can't remember what I did at that time :/ probably the wrong database user.

languitar

comment created time in 23 days

issue openedquarkusio/quarkus

Kotlin no-arg/jpa compiler plugin ignored when recompiling in continuous testing mode

Describe the bug

In a Kotlin project that uses the no-arg / jpa Kotlin compiler plugin, entities cannot be changed in continuous testing mode because the compiler plugin is not used when the affected entity class is recompiled on demand. As a result, tests the fail due to a missing no-arguments constructor.

Expected behavior

Entites can be changed just as any other code and tests simply continue to work.

Actual behavior

2021-11-13 19:43:39,882 ERROR [io.qua.test] (Test runner thread) ==================== TEST REPORT #2 ====================
2021-11-13 19:43:39,883 ERROR [io.qua.test] (Test runner thread) Test TestEntityTest#it can be persisted and retrieved() failed
: java.lang.RuntimeException: java.lang.ExceptionInInitializerError
	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:577)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:650)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:73)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:77)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestClassConstructor(ClassBasedTestDescriptor.java:355)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:302)
	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:79)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:280)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:272)
	at java.base/java.util.Optional.orElseGet(Optional.java:369)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:271)
	at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:102)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:101)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:66)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:95)
	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:91)
	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:60)
	at io.quarkus.deployment.dev.testing.JunitTestRunner$3.run(JunitTestRunner.java:228)
	at io.quarkus.deployment.dev.testing.ModuleTestRunner$2.run(ModuleTestRunner.java:90)
	at io.quarkus.deployment.dev.testing.TestSupport.runInternal(TestSupport.java:385)
	at io.quarkus.deployment.dev.testing.TestSupport$2.run(TestSupport.java:294)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ExceptionInInitializerError
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:398)
	at io.quarkus.runner.bootstrap.StartupActionImpl.run(StartupActionImpl.java:221)
	at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:243)
	at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:554)
	at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:592)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$10(ClassBasedTestDescriptor.java:381)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invoeAllCallbacks(ClassBasedTestDescriptor.java:381)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:205)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:80)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
	... 34 more
Caused by: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.runner.ApplicationImpl.<clinit>(ApplicationImpl.zig:301)
	... 46 more
Caused by: org.hibernate.HibernateException: Failed to generate Enhanced Proxy: default constructor is missing for entity 'TestEntity'. Please add a default constructor explicitly.
	at io.quarkus.hibernate.orm.runtime.proxies.ProxyDefinitions.createFromMetadata(ProxyDefinitions.java:75)
	at io.quarkus.hibernate.orm.runtime.boot.FastBootMetadataBuilder.build(FastBootMetadataBuilder.java:374)
	at io.quarkus.hibernate.orm.runtime.PersistenceUnitsHolder.createMetadata(PersistenceUnitsHolder.java:101)
	at io.quarkus.hibernate.orm.runtime.PersistenceUnitsHolder.constructMetadataAdvance(PersistenceUnitsHolder.java:73)
	at io.quarkus.hibernate.orm.runtime.PersistenceUnitsHolder.initializeJpa(PersistenceUnitsHolder.java:40)
	at io.quarkus.hibernate.orm.runtime.HibernateOrmRecorder$1.created(HibernateOrmRecorder.java:68)
	at io.quarkus.arc.runtime.ArcRecorder.initBeanContainer(ArcRecorder.java:70)
	at io.quarkus.deployment.steps.ArcProcessor$generateResources-1025303321.deploy_0(ArcProcessor$generateResources-1025303321.zig:128)
	at io.quarkus.deployment.steps.ArcProcessor$generateResources-1025303321.deploy(ArcProcessor$generateResources-1025303321.zig:40)
	at io.quarkus.runner.ApplicationImpl.<clinit>(ApplicationImpl.zig:248)
	... 46 more

How to Reproduce?

https://github.com/languitar/kotlin-panache-reload-issue contains a project to start with

  1. mvn quarkus:dev
  2. Start continues testing by pressing r - tests will execute successfully
  3. in TestEntity.kt uncomment the line containing uncommentToTriggerBug

Tests will re-execute and fail.

Output of uname -a or ver

Linux bird 5.14.16-arch1-1 #1 SMP PREEMPT Tue, 02 Nov 2021 22:22:59 +0000 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.13" 2021-10-19

GraalVM version (if different from Java)

No response

Quarkus version or git rev

as in project

Build tool (ie. output of mvnw --version or gradlew --version)

Maven 3.8.3

Additional information

Initially discussed in Zulip: https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/Continuous.20testing.20with.20kotlin.20compiler.20plugins

created time in 23 days

create barnchlanguitar/kotlin-panache-reload-issue

branch : main

created branch time in 23 days

created repositorylanguitar/kotlin-panache-reload-issue

Reproduction for a bug in Quarkus continuous testing where the kotlin jpa compiler plugin is not used on recompilation

created time in 23 days

issue openedmock-server/mockserver

JSON string response generated from OpenAPI spec lacks double quotes

Describe the issue

When mocking a route that returns a JSON string based on an OpenAPI specification, the resulting mock response returns the string without the mandatory double quotes.

What you are trying to do Mocking a route returning a JSON string must create a valid JSON response with the mandatory quotes.

MockServer version 5.11.2

To Reproduce Steps to reproduce the issue:

Given the following /tmp/openapi.yaml

openapi: 3.0.0
info:
  title: test
  description: foo
  version: 1.0.0
servers:
  - url: /
paths:
  /test:
    get:
      summary: foo
      responses:
        '200':    # status code
          content:
            application/json:
              schema: 
                type: string
                format: uuid
                example: 06be83b3-5fb5-4103-a9b3-3fcd097a0634
  1. mockserver -serverPort 108
  2. load the spec
    curl -v -X PUT "http://localhost:1080/mockserver/openapi" -d '{
          "specUrlOrPayload": "file:/tmp/openapi.yaml"
    }'
    
  3. curl http://localhost:1080/test

This returns 06be83b3-5fb5-4103-a9b3-3fcd097a0634.

Expected behaviour

The returned data should be "06be83b3-5fb5-4103-a9b3-3fcd097a0634"

MockServer Log

❯ mockserver -serverPort 1080

java  -Dfile.encoding=UTF-8 -jar /usr/local/lib/mockserver/mockserver-netty-jar-with-dependencies.jar  -serverPort 1080 -logLevel INFO &

2021-11-11 22:30:54 5.11.2 INFO logger level is INFO, change using:
 - 'ConfigurationProperties.logLevel(String level)' in Java code,
 - '-logLevel' command line argument,
 - 'mockserver.logLevel' JVM system property or,
 - 'mockserver.logLevel' property value in 'mockserver.properties'
2021-11-11 22:30:54 5.11.2 INFO 1080 started on port: 1080
2021-11-11 22:31:15 5.11.2 INFO 1080 creating expectation:

  {
    "id" : "40c71f3c-440f-4213-96ed-6e354a56c605",
    "priority" : 0,
    "httpRequest" : {
      "operationId" : "GET /test",
      "specUrlOrPayload" : "file:/tmp/openapi.yaml"
    },
    "times" : {
      "unlimited" : true
    },
    "timeToLive" : {
      "unlimited" : true
    },
    "httpResponse" : {
      "statusCode" : 200,
      "headers" : {
        "content-type" : [ "application/json" ]
      },
      "body" : "06be83b3-5fb5-4103-a9b3-3fcd097a0634"
    }
  }

 with id:

  40c71f3c-440f-4213-96ed-6e354a56c605

2021-11-11 22:31:29 5.11.2 INFO 1080 received request:

  {
    "method" : "GET",
    "path" : "/",
    "headers" : {
      "Host" : [ "localhost:1080" ],
      "User-Agent" : [ "curl/7.64.1" ],
      "Accept" : [ "*/*" ],
      "content-length" : [ "0" ]
    },
    "keepAlive" : true,
    "secure" : false
  }

2021-11-11 22:31:29 5.11.2 INFO 1080 request:

  {
    "method" : "GET",
    "path" : "/",
    "headers" : {
      "Host" : [ "localhost:1080" ],
      "User-Agent" : [ "curl/7.64.1" ],
      "Accept" : [ "*/*" ],
      "content-length" : [ "0" ]
    },
    "keepAlive" : true,
    "secure" : false
  }

 didn't match open api "" operation "GET /test" request matcher:

  {
    "method" : "GET",
    "path" : "/test"
  }

 because:

  method matched
  path didn't match

2021-11-11 22:31:29 5.11.2 INFO 1080 no expectation for:

  {
    "method" : "GET",
    "path" : "/",
    "headers" : {
      "Host" : [ "localhost:1080" ],
      "User-Agent" : [ "curl/7.64.1" ],
      "Accept" : [ "*/*" ],
      "content-length" : [ "0" ]
    },
    "keepAlive" : true,
    "secure" : false
  }

 returning response:

  {
    "statusCode" : 404,
    "reasonPhrase" : "Not Found"
  }

2021-11-11 22:31:34 5.11.2 INFO 1080 received request:

  {
    "method" : "GET",
    "path" : "/test",
    "headers" : {
      "Host" : [ "localhost:1080" ],
      "User-Agent" : [ "curl/7.64.1" ],
      "Accept" : [ "*/*" ],
      "content-length" : [ "0" ]
    },
    "keepAlive" : true,
    "secure" : false
  }

2021-11-11 22:31:34 5.11.2 INFO 1080 request:

  {
    "method" : "GET",
    "path" : "/test",
    "headers" : {
      "Host" : [ "localhost:1080" ],
      "User-Agent" : [ "curl/7.64.1" ],
      "Accept" : [ "*/*" ],
      "content-length" : [ "0" ]
    },
    "keepAlive" : true,
    "secure" : false
  }

 matched request:

  {
    "method" : "GET",
    "path" : "/test"
  }

2021-11-11 22:31:34 5.11.2 INFO 1080 returning response:

  {
    "statusCode" : 200,
    "headers" : {
      "content-type" : [ "application/json" ]
    },
    "body" : "06be83b3-5fb5-4103-a9b3-3fcd097a0634"
  }

 for request:

  {
    "method" : "GET",
    "path" : "/test",
    "headers" : {
      "Host" : [ "localhost:1080" ],
      "User-Agent" : [ "curl/7.64.1" ],
      "Accept" : [ "*/*" ],
      "content-length" : [ "0" ]
    },
    "keepAlive" : true,
    "secure" : false
  }

 for action:

  {
    "statusCode" : 200,
    "headers" : {
      "content-type" : [ "application/json" ]
    },
    "body" : "06be83b3-5fb5-4103-a9b3-3fcd097a0634"
  }

 from expectation:

  40c71f3c-440f-4213-96ed-6e354a56c605

created time in 25 days

issue openedOpenAPITools/openapi-generator

[BUG][jaxrs-spec] @JsonTypeName does not use specified discriminator mapping

Bug Report Checklist

  • [ ] Have you provided a full/minimal spec to reproduce the issue?
  • [x] Have you validated the input using an OpenAPI validator (example)?
  • [x] Have you tested with the latest master to confirm the issue still exists?
  • [x] Have you searched for related issues/PRs?
  • [x] What's the actual output vs expected output?
  • [ ] [Optional] Sponsorship to speed up the bug fix or feature request (example)

<!-- Please follow the issue template below for bug reports. Also please indicate in the issue title which language/library is concerned. Eg: [BUG][JAVA] Bug generating foo with bar -->

Description

https://swagger.io/specification/#discriminator-object describes how the mapping key in a discriminator object can be used to control the contents of the discriminator field in case of polymorphism. When providing a mapping, instead of the type name the declared map key has to be used per type as the content of the discriminator field.

The current code used to generate the @JsonTypeName annotation that is used to provide the discriminator value with jackson mapping in many generators (including jaxrs-spec) always uses the data type name, ignoring a potential mapping.

For the example from the linked specification:

    MyResponseType:
      oneOf:
      - $ref: '#/components/schemas/Cat'
      - $ref: '#/components/schemas/Dog'
      - $ref: '#/components/schemas/Lizard'
      - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
      discriminator:
        propertyName: petType
        mapping:
          dog: '#/components/schemas/Dog'
          monster: 'https://gigantic-server.com/schemas/Monster/schema.json'

The generated Dog Java class should have the following annotation: @JsonTypeName("dog"). At the moment, it will always be @JsonTypeName("Dog").

openapi-generator version

5.3.x

OpenAPI declaration file content or url
components:
  schemas:
    MyResponseType:
      oneOf:
      - $ref: '#/components/schemas/Dog'
      discriminator:
        propertyName: petType
        mapping:
          dog: '#/components/schemas/Dog'
    Dog:
      type: object
      properties:
        test:
          type: string
Generation Details

nothing fancy, jaxrs-spec with library Quarkus and Jackson mapping is enough to trigger this.

Steps to reproduce

Just generate the code.

Related issues/PRs
Suggest a fix

I suspect there are some actual Java code changes required to compute the intended name from a potentially existing mapping.

created time in a month

issue commentstoplightio/prism

Prism cannot recognize readOnly property nested in allOf

What happened to the commit that closed this issue? We are facing a similar issue.

radzserg

comment created time in a month

push eventlanguitar/config-nvim

Johannes Wienke

commit sha 3852a503155a6fb6344e757e9b882545dfe1c2cf

Add language tool

view details

push time in a month

push eventlanguitar/config-nvim

Johannes Wienke

commit sha dd8ea40d595f23599edb816950c74995a1c6b05f

Improved kotlin setup * Add ktlint to EFM for linting and formatting * Use the kotlin-language-server binary from /usr/bin. If pulled from the symlined /sbin on arch something inside the launcher script breaks.

view details

push time in a month

issue openedmattn/efm-langserver

Ability to ignore the format command exit code

ktlint for kotlin can do auto-formatting. But after formatting it always also performs linting. If errors remain after formatting, the exit code will be != 0. I would need an option to ignore this non-zero exit code for formatting to make ktlint formatting functional.

created time in a month

push eventlanguitar/config-nvim

Johannes Wienke

commit sha 324bc1c7b8ed4c7c5fe31e59afaa7ee1e27b9ca9

Update to newer plugin versions

view details

Johannes Wienke

commit sha fc4955477dfb2970d65647fbf332b5a6c0982ff4

Configure spellsitter to use fast vim checking

view details

push time in a month

create barnchlanguitar/qmk_firmware

branch : languitar-512

created branch time in a month

push eventlanguitar/qmk_firmware

Johannes Wienke

commit sha 77adb86b5907cd07922af113012231cd11573369

Initial 5x12 layout

view details

push time in a month

push eventlanguitar/hugo-theme-hello-friend-ng

Johannes Wienke

commit sha c97db4bbf44f145b47cdf8d2bd1ead8dbdb1852c

Add styling for asciidoc literal blocks

view details

push time in a month

issue commentOpenAPITools/openapi-generator

[BUG] Invalid warning about inline schema usage in allOf

Why is this closed? Still seems to happen in the latest release.

typhoon2k

comment created time in a month

pull request commentrenovatebot/docker-renovate-full

fix(deps): downgrade to working CacheControl

Nice that this was fixed soon enough upstream. So we close this PR?

languitar

comment created time in a month

Pull request review commentrenovatebot/docker-renovate-full

fix(deps): downgrade to working CacheControl

 RUN install-pip pipenv 2020.11.15  # renovate: datasource=github-releases lookupName=python-poetry/poetry RUN install-tool poetry 1.1.11+# Workaround until https://github.com/python-poetry/poetry/issues/4688 is fixed+RUN /usr/local/poetry/*/venv/bin/pip install cachecontrol==0.12.6

I don't think the fix is related to poetry itself. The poetry installer doesn't seem to pin upstream dependencies. So, whenever a fixed release of CacheControl becomes available, this line will become outdated. That can be before or after the next poetry release.

languitar

comment created time in a month

PullRequestReviewEvent

issue commentrenovatebot/docker-renovate-full

Current docker image ships a broken poetry installation

I have transferred and reopened it, although as I mentioned the fix might need to be e.g. in https://github.com/containerbase/buildpack/blob/main/src/usr/local/buildpack/tools/poetry.sh which is a different github org so can't be transferred to

I'm not sure how far this should traverse the dependency tree. #367 would solve this at least for the renovate docker image.

languitar

comment created time in a month

more