-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
GSoC: Source Generation Analyzer Powered by Corvus.JsonSchema (.Net) #614
Comments
Hi @gregsdennis , I would like to know more about this issue. Can you please elaborate on what exactly needs to be done? |
We're still working some of this out, but off of the top of my head: Corvus.JsonSchema is currently only a It's likely this can be added to the same Nuget package, though this will need to be researched and confirmed. If it can be, then probably no edits to the exiting code will be needed; just the addition of the analyzer and updating the package accordingly. If not, then there will likely need to be some refactoring of existing code to expose some API. @mwadams can likely provide insights on the existing code. Ideal user experienceIdeally, it will function similarly to the [GenerateFromSchema("path/to/schema.json")]
public partial class MyModel; or even [assembly:GenerateModelsFromSchema(Schema: "path/to/schema.json", NameSpace: "MyProject.Models")] You can't put attributes on namespaces, unfortunately, so the target will need to be specified in a string. I'm not attached to either of these approaches and am open to others, but I think the assembly-level attribute will likely be the most user-friendly. The attribute itself will be unconditionally source-generated (again, see the video), which will make it available for use immediately upon installing the Nuget package into the target project. |
Thank you for your detailed explanation @gregsdennis.I'll explore both options and any other possibilities, and I'll get back to you. |
We still need to wait for other interested contributors. There's still some selection process that we have to go through. Feel free to read up and mull things over, but don't put any effort into this until we're ready to go. Please join the #gsoc channel in Slack for more info and coordination. |
Thanks a lot for joining JSON Schema org for this edition of GSoC!! Qualification tasks will be published as comments in the project ideas by Thursday/Friday of this week. In addition I'd like to invite you to a office hours session this thursday 18:30 UTC where we'll present the ideas and the relevant date to consider at this stage of the program. Please use this link to join the session: See you there! |
Qualifying TaskTo qualify for this project, we ask that you perform the tasks below. A .Net solution has been provided to get you started. In this solution there are three projects: CorvusQualification, ExistingPackage, UserCode.
The completed work will need to be submitted via the GSoC platform. Instructions for this can be found in the contributor guidelines. |
Hi @gregsdennis , Task is interesting will DM you with solution asap : ) |
Hi @gregsdennis |
Hi @gregsdennis, I recently watched the video on high-performance JSON serialization, where they used a pre-defined class to generate code for a JSON context, effectively avoiding reflection. the generator dealt witth JSON data . For our qualification task, we need to work with a JSON schema. Could you provide a demo schema.json that guides us in extracting key details, such as property names and types, using a JSON serializer or another NuGet package? This will assist us in generating a well-structured partial class as generated code. Thank you! |
@mathanraj0601 please just do the task as stated. You don't need any more information than what's given. Once we get into the project, we'll cover more of what's required for that. |
@Kombaiya-MK applications to GSoC are due 18 March, so let's shoot for no later than 11 March. That will give Matt and me time to review the tasks and make a selection. |
Sure @gregsdennis |
Sure @gregsdennis |
Just added a link to the Contributor Guidance in the opening comment. Please read through this and make sure your applications conform to the requirements. |
Hi mentors,
My approach:-
Someone on the stackoverflow suggest that it might be a |
The solution as posted above does not compile. The first part of the task is to add an incremental source generator to ExistingLibrary that creates the attribute, allowing the solution to compile. This is the task that you have to fulfill. I can't provide direction, only clarification. The "incremental source generators" video linked in the opening comment gives enough information on how to do this. |
Introductory QuestionsHi everyone, this is Pranay. I am a Full-Stack Developer currently working as a GIS Engineer at the University of Alabama. I am also voluntarily working as a BCI (Brain Computer Interface) Research Assistant, where I am specifically working on creating an SDK between a Bluetooth headset called MUSE.
|
@pranayjoshi @mathanraj0601 @Kombaiya-MK due to some complications, I've had to update the template solution for the qualification task. Please download the new one (link replaced above). If you've done any work, you should be able to copy it over with some renaming ("ExistingLibrary" -> "ExistingPackage"). |
Sure @gregsdennis |
🚩 IMPORTANT INSTRUCTIONS REGARDING HOW AND WHERE TO SUBMIT YOU APPLICATION 🚩 Please join this discussion in JSON Schema slack to get the last details very important details on how to better submit your application to JSON Schema. See communication here. |
Hello @gregsdennis , I have knowledge in Roslyn & Source Generators (I worked on many projects, such as my project Organizer-SG) and I contributed to them in .NET. Is it still possible to apply to work on this exciting task? |
@MoMakkawi the deadline for applications is 2 Apr. If you can submit before then, you're welcome to. Join #gsoc in slack. Instructions are in the history there. |
This comment has been minimized.
This comment has been minimized.
Hello! 👋 This issue has been automatically marked as stale due to inactivity 😴 It will be closed in 180 days if no further activity occurs. To keep it active, please add a comment with more details. There can be many reasons why a specific issue has no activity. The most probable cause is a lack of time, not a lack of interest. Let us figure out together how to push this issue forward. Connect with us through our slack channel : https://json-schema.org/slack Thank you for your patience ❤️ |
Hello! 👋 This issue has been automatically marked as stale due to inactivity 😴 It will be closed in 180 days if no further activity occurs. To keep it active, please add a comment with more details. There can be many reasons why a specific issue has no activity. The most probable cause is a lack of time, not a lack of interest. Let us figure out together how to push this issue forward. Connect with us through our slack channel : https://json-schema.org/slack Thank you for your patience ❤️ |
Source Generation Analyzer Powered by Corvus.JsonSchema (.Net)
Brief Description
The JSON Schema implementation Corvus.JsonSchema operates by generating source code for types based on a supplied JSON Schema such that the validation constraints present in the schema are rendered in code. An overview of how it works can be found in this video.
Often, different software development teams within a single organization will use different tech stacks to implement their functionality. JSON Schema can help unify these teams by providing a single source of truth for data modelling. The teams will then generate code for the data models.
Extended Description
Please see this comment
Expected Outcomes
This project is to wrap the code generation functionality of the Corvus library in a .Net source generation analyzer to assist developers by easily generating data models using JSON Schema as a source of truth.
Skills Required
Mentors
Expected Difficulty
Medium, if the candidate is familiar with source generators. Hard otherwise.
Expected Time Commitment
175 (minimum, probably)
Expressing interest
If you would like to help with this project, please express your interest in a comment below and read through and complete the Qualification Task and be sure to follow the Contributor Guidance.
The text was updated successfully, but these errors were encountered: