Skip to content

Comments

Adding fixes#52

Open
escamoteur wants to merge 2 commits intoeseidel:mainfrom
escamoteur:adding_fixes
Open

Adding fixes#52
escamoteur wants to merge 2 commits intoeseidel:mainfrom
escamoteur:adding_fixes

Conversation

@escamoteur
Copy link

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

@eseidel
Copy link
Owner

eseidel commented Sep 5, 2025

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

@eseidel
Copy link
Owner

eseidel commented Oct 15, 2025

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

@escamoteur
Copy link
Author

escamoteur commented Oct 15, 2025 via email

@eseidel
Copy link
Owner

eseidel commented Oct 15, 2025

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.

@escamoteur
Copy link
Author

escamoteur commented Oct 15, 2025 via email

@eseidel
Copy link
Owner

eseidel commented Oct 15, 2025

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

throw Exception('Schema not found: $ref');
}

ResolvedSchema resolvedSchema;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand why this is using a local instead of just the returns like it was before. 🤔

Comment on lines +376 to 385
// 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);
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, this is why.

@escamoteur
Copy link
Author

escamoteur commented Oct 15, 2025 via email

@escamoteur
Copy link
Author

escamoteur commented Oct 15, 2025 via email

@eseidel
Copy link
Owner

eseidel commented Oct 15, 2025

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants