space_gen icon indicating copy to clipboard operation
space_gen copied to clipboard

Adding fixes

Open escamoteur opened this issue 3 months ago • 9 comments

I played some hours together with Cursors agents and it now processes our full api-spec which has some nested structures. Not sure if you can use the generated code but maybe it gives some ideas

If you want to test our full spec I can sent it to you

escamoteur avatar Sep 05 '25 02:09 escamoteur

Thanks! I'll look through it in more detail this weekend.

eseidel avatar Sep 05 '25 04:09 eseidel

I think the changes here largely make sense, I just would need to write some test for them and/or have a motivating spec.

eseidel avatar Oct 15 '25 01:10 eseidel

You mean a spec that requires that fixes? Am 14. Okt. 2025, 20:16 -0500 schrieb Eric Seidel @.***>:

eseidel left a comment (eseidel/space_gen#52) I think the changes here largely make sense, I just would need to write some test for them and/or have a motivating spec. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

escamoteur avatar Oct 15 '25 01:10 escamoteur

Yeah, I have a separate git repo (which I really should just post publicly) where I have several specs checked in that a test against. I haven't added date, email, etc. yet since those specs haven't needed them, but obviously those are in the official spec, so we certainly can/should add them.

eseidel avatar Oct 15 '25 01:10 eseidel

Can I sent it privately to you? Then I can sent you our official spec Am 14. Okt. 2025, 20:20 -0500 schrieb Eric Seidel @.***>:

eseidel left a comment (eseidel/space_gen#52) Yeah, I have a separate git repo (which I really should just post publicly) where I have several specs checked in that a test against. I haven't added date, email, etc. yet since those specs haven't needed them, but obviously those are in the official spec, so we certainly can/should add them. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

escamoteur avatar Oct 15 '25 01:10 escamoteur

It's not required. If you say that these changes make it work for you i can work to get them landed. Thanks.

eseidel avatar Oct 15 '25 01:10 eseidel

I am completely honest, I was torturing Cursors AI agent until our spec passed. I cannot explain exactly why this part was done that way. Am 14. Okt. 2025, 20:48 -0500 schrieb Eric Seidel @.***>:

@eseidel commented on this pull request. In lib/src/resolver.dart:

final schema = context._maybeResolve(ref); if (schema == null) { throw Exception('Schema not found: $ref'); }

  • ResolvedSchema resolvedSchema; I don't really understand why this is using a local instead of just the returns like it was before. 🤔 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

escamoteur avatar Oct 15 '25 01:10 escamoteur

The problem were nested types Am 14. Okt. 2025, 20:50 -0500 schrieb Eric Seidel @.***>:

@eseidel commented on this pull request. In lib/src/resolver.dart:

  • // Cache the resolved schema
  • if (ref.ref != null) {
  • final uri = context.specUrl.resolveUri(ref.ref!.uri);
  • resolvedCache[uri] = resolvedSchema;
  • resolving.remove(uri);
  • } else {
  • final pointerUri = Uri.parse('inline:${ref.pointer.toString()}');
  • resolvedCache[pointerUri] = resolvedSchema;
  • resolving.remove(pointerUri); } I see, this is why. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

escamoteur avatar Oct 15 '25 01:10 escamoteur

OK, how about you do send me any spec you're willing to share that fails and I can make a non-AI patch that I do understand. :) Otherwise I'll work to land other parts of this, at least as much as the GitHub or Stripe specs depend on (which are two that I test with). Thanks.

eseidel avatar Oct 15 '25 02:10 eseidel